-----Original Message----- From: centos-bounces@centos.org [mailto:centos-bounces@centos.org] On Behalf Of Alexander Dalloz Sent: Tuesday, April 11, 2006 2:05 PM To: CentOS mailing list Subject: RE: [CentOS] Sendmail problem
Am Di, den 11.04.2006 schrieb Thomas E Dukes um 19:34:
Hello Alexander,
As far as I know, I have my FQDN set. It may not be done
so correctly
in sendmail.
hostname
/usr/lib/sendmail -bt -d0.6 < /dev/null
Here's a portion of my sendmail.mc file:
LOCAL_DOMAIN(`localhost.localdomain')dnl <---- do I need to change this to my FDQN?
No. From /usr/share/doc/sendmail/README.cf:
+-----------------------------------+ | ACCEPTING MAIL FOR MULTIPLE NAMES | +-----------------------------------+
If your host is known by several different names, you need to augment class {w}. This is a list of names by which your host is known, and anything sent to an address using a host name in this list will be treated as local mail. You can do this in two ways: either create the file /etc/mail/local-host-names containing a list of your aliases (one per line), and use ``FEATURE(`use_cw_file')'' in the .mc file, or add ``LOCAL_DOMAIN(`alias.host.name')''. Be sure you use the fully-qualified name of the host, rather than a short name.
If you want to have different address in different domains, take a look at the virtusertable feature, which is also explained at http://www.sendmail.org/virtual-hosting.html
dnl # dnl # The following example makes mail from this host and any additional dnl # specified domains appear to be sent from
mydomain.com
dnl # dnl # masquerade not just the headers, but the
envelope as well
dnl # dnl FEATURE(masquerade_envelope)dnl dnl # dnl #
masquerade not
just @mydomainalias.com, but @*.mydomainalias.com as well dnl # dnl FEATURE(masquerade_entire_domain)dnl dnl # dnl MASQUERADE_DOMAIN(localhost)dnl dnl MASQUERADE_DOMAIN(localhost.localdomain)dnl <------
How about this?
dnl # MASQUERADE_DOMAIN(mydomainalias.com)dnl dnl # MASQUERADE_DOMAIN(mydomain.lan)dnl MAILER(smtp)dnl MAILER(`procmail')
What masquerade feature do I need to setup so that mail sent from domain1, domain2, domain3, etc., is sent from the
respective domains?
If you have multiple domains to host you probably don't want to use the masquerade feature as that causes Sendmail to always rewrite to just a single domain name (MASQUERADE_AS).
From DSN report we see that it was your Apache to send the mail out. Typically it is submitting, so you could use "sendmail -f realuser@domain.tld" to change the sender. If you run PHP you should have a close look at http://phpmailer.sourceforge.net/ instead of using the mail() function.
Alexander
The domains are listed in /etc/mail/local-host-names. My sendmail.mc also has the FEATURE(`use_cw_file'). From what I understand this is for accepting mail for these domains. The problem maybe related but the correct 'sent from' address is not being applied to outgoing mail. The scripts sending the outgoing mail are set to use a valid user in the domain.
I have no problem getting mail - just the outgoing.
TIA