[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vps-mail] mailertable



Sikaspam <sikaspam@xxxxxxxxxxx> said:

> I user a line like this in etc/mailertable to test
> 
> fake.domain.com		local:username
> 
> (fake is a duly entered CNAME of domain.com in DNS and resolves)
> 
> I sent an email to existingname@xxxxxxxxxxxxxxx
> username is a local user
> existingname is routed by etc/aliases to procmail
> 
> What I see is that the mail is delivered to existingname by executing 
> procmail instead of going to the local user username.

If you have procmail defined as the local delivery agent/local mailer (with a 
line such as FEATURE(`local_procmail') ...), then that is the only way 
sendmail knows how to make local deliveries--via procmail. ... So it is 
working correctly.

> I put the FEATURE(mailertable) before the FEATURE(virtualuser) in the 
> .mc (I'm too lazy to type the quotes and real names here.)

The sequence of FEATUREs in the mc file usually doesn affect the resulting cf 
file. (In this case, I doubt that it makes any difference.) (Order *can be* 
important in the mc file. In general, when I want to add a FEATURE, I look for 
other FEATURE lines, and add the new feature either before or after some other 
FEATURE.)

> I haven't finished reading the Sendmail Cookbook yet, but I thought I'd 
> ask here about the VPS part before wasting more time.

AFAIK mailertable works just fine on VPSes.

> I would have thought that mailertable had priority over virtuser and 
> aliases, but I could be way off on that.

The mailertable is referenced before virtusertable and aliases (during the 
execution of rule set 0 (zero)--which determines which mailer will deliver the 
mail.)

If rule set 0 determines that the local mailer should deliver the mail 
(*usually* because the address is in class w [local-host-names]), then it 
passes the mail to procmail, imail, mail.local, or whatever else the local 
mailer is. (You can see what program is your local mailer by issuing this 
command in the directory that contains sendmail.cf:

grep '^Mlocal' sendmail.cf

Whatever follows the "P=" in the output is the program that delivers mail 
locally.)

I have generally used mailertables to rescue addresses that are "trapped" on 
the local server (where sendmail "thinks" they should be delivered locally). I 
have (for example) used the mailertable to assign a non-local mailer (such as 
esmtp) and send them off to some other mail server instead.

I apologize for the information overload. Feel free to press "delete" if this 
is more than you wanted to know ... (I also apologize for any unintended 
typos, etc.)

-- 
Bennett Lanford
ben@xxxxxxxxxxxxx


======================================================================
This is <vps-mail@xxxxxxxxxxxx>       <http://www.perlcode.org/lists/>
Before posting a question, please search the archives (see above URL).


Main Index | Thread Index
Match: Format: Sort by:
Search: