Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Forward mail for unknown users

Status
Not open for further replies.

b4mule

Technical User
Aug 27, 2002
28
0
0
AU
Is there a sendmail option or method for forwarding mail for unknown users to a different host? I have to do this without forwarding everyones mail to this other host.
 
Have you tried your aliase file if it is a one user thing:

Joe wants his mail forwarded to his new company:

/etc/aliases

joe: joe@newcompany.com

or you want to forward all mail within a queue to a certain new email box that may or maynot be on your server:

formail (check the man pages....lots of options here)

 
Hi there,

The way I do this is to get fetchmail to deliver using the these options in .fetchmailrc:

set postmaster "admin@otherbox.mydomain.com"
with envelope "x-delivered-to"
localdomains mydomain.com
user USERNAME, with password PASSWORD, to * here

This will deliver mail to an account of the same name i.e. mail received for joe@mydomain.com will be delivered to local mailbox for user joe.

create sendmail aliases to handle unfriendly names, or mail that want to be trapped. i.e.

Tech: joe
support: dave

Any other mail to *@mydomain.com where an account, or an alias does not exist, will be sent by default to the account you specify as postmaster in .fetchmailrc.

admin@othermachine.mydomin.com

Hey presto! Mail for unknown user is sent to another machine.

Regards,
JayBot[afro] "Always know what you say, but don't always say what you know!"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top