This page looks plain and unstyled because you're using a non-standard compliant browser. To see it in its best form, please upgrade to a browser that supports web standards. It's free and painless.

Paul's Time Sink

| Main | Albums |

« | »

Fixing sender address with sendmail

Paul Westbrook | 13 January, 2005 21:16

I have been trying to send email on one of my linux workstations, but the sender address has the host name of my machine. This causes problems because the host name is not a publicly resolvable name. I found the solution on this page.

Create a file /etc/mail/genericstable
Put the following in it:

username username@domain.com

run

makemap hash /etc/mail/genericstable < /etc/mail/genericstable

Add the following to /etc/mail/sendmail.mc


FEATURE(masquerade_envelope)dnl
FEATURE(genericstable)
GENERICS_DOMAIN(hostname)
GENERICS_DOMAIN(hostname.sub.domain.com)
GENERICS_DOMAIN(sub.domain.com)

run:

m4 /etc/mail/sendmail.mc > /etc/sendmail.cf

then

/etc/init.d/sendmail restart

In postfix, all you need to do is specify

myorigin = $mydomain

in the main.cf file.

Add comment

Topic

Text

Your name

Your email address

Your personal page (if any)




Powered by LifeType
Design by Book of Styles