Am So, den 15.08.2004 schrieb Ow Mun Heng um 12:19:
What exactly does genericstable do? (Sorry, writing this mail off-line)
Please read my explanations in the posting I just wrote for Harry.
My Problem.
@work = mails must be sent out using the corp exhange server (smart host feature _must_ be implemented via sendmail.mc)
@home = mails are sent out w/o using smart host. Meaning, I have to actively re-compile sendmail.mc each time between office and home to send out emails. Cause @home, mails gets relayed directly to the receipient's MX.
You use the same email address @wdc.com from work too at home? Can you use the business mail server as smart host as well from at home (SMTP AUTH)?
It is not an internet FQDN, just my own made up domain for my local lan. Therefore will never be resovable by dns lookups.
Just as I thought. And what/how does this affect mail sending?
It will lead to rejects by foreign MTAs. For SPAM fighting most MTAs meanwhile don't accept mail with 'faked' sender addresses.
My attempt at using generics tables consisted of adding: (see sendmail2.mc below for the full settings)
FEATURE(`genericstable')dnl FEATURE(`generics_entire_domain')dnl
And to /etc/mail/genericstable: reader reader@newsguy.com
What does this achieve? I don't see a genericstable in my /etc/mail/ directory
You have to create a genericstable your own, if you like to use that one. For each domain in class {G} - the generics-domains listing is missing here - the sender address on the left side in the genericstable map file is rewritten to what is to be found on the right hand side.
Aug 14 19:31:34 reader sendmail[12324]: i7F0VTsA012322: to=reader@jtan.com, ctladdr=reader@reader.local.net0 (500/500), delay=00:00:04, xdelay=00:00:04, mailer=relay, pri=120355, relay=smtp.newsguy.com. [129.250.170.69], dsn=5.6.0, stat=Data format error
What's data format error? And I see that your relay is = smtp.newsguy.com, which resolves to your Inet Public IP.
smtp.newsguy.com is Harry's ISP's smart host MTA.
For my case, it gets relayed to the localhost (127.0.0.1)'s smtp. which then hands it over to sendmail to contact the MX.
Yes, this is part of communication between Harry's Sendmail and the smart host.
What I want to know is, is there a way to say that I want mails to be sent out 1st using the Direct approach, if it fails then fall back to the smart host.
Something like /etc/host.conf
user$ cat host.conf order hosts,bind
pseudo code : if [check if it's a local address ]; then pass to local sendmail elif [check if we can send direct to MX ] pass to sendmail for direct MX else # when all else fails pass to smart host for relay
If I remember correctly there is no such fallback order. Do you use different mail addresses at work and at home? Then you could use smarttable. Else I would suggest not using the smart_host definition in the sendmail.mc file, but to use the mailertable instead. That makes switching a bit easier: you don't need to restart the Sendmail daemon because you don't change the sendmail.mc/.cf file but the mailtertable hashed map file: edit the mailertable file and run "make -C /etc/mail" and your change takes place immediately. See
http://www.sendmail.org/m4/mailertables.html
on how to set the entry for your smart host. To deactivate simply put a # in front of it to directly speak to the recipient MTAs.
Ow Mun Heng
Alexander