Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


SendMail Configuration Issue

Posted on 2007-04-04
Medium Priority
Last Modified: 2013-12-17
Running a fedora core 6 webserver for a gaming league i'm building., and the site email system is not working.

The configuration I want is for the sendmail server to relay all outbound mail from the site to my exchange server which is setup with a reverse pointer to keep emails from getting flagged as spam. I do not want the sendmail server processing mail, i simply want it to relay to my smtp (exchange) server.

What it looks like is happening is the sendmail server thinks it's supposed to process and route incoming emails and relay the rest of them to the exchange server. When i use the sites emailing features i can receive the emails to my non addy's (my exchange box hosts multiple domains and others on the exchange box recieve the messages), but emails sent to any staff email disappears.

I need help configuring this server to relay every message it receives including I am currently using webmin to administer the sendmail server.
Question by:newimagent
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
LVL 27

Expert Comment

ID: 18854747
newimagent, hi.

> I want is for the sendmail server to relay all outbound mail from the site to my exchange server
Relay means 'transit' trafic, so you may relay all incoming traffic to exchange, not ooutgoing. If you want to configure sendmail not to accept incoming mail at all, just stop 'sendmail' daemon.

I never used webmin, but I suppose it has all the same features that are commonly used in sendmail.  So guess that you configured 'mail hub' or 'smart host' on your Fedora's sendmail to point to exchange, but it forwards all mail except for The problem is in a mail domain, that is configured on your sendmail to be '', so that sendmail thinks that all mail to that domain is a local for that host and it doesn't forward this mail, but keeps in /var/mail/ directory instead.
There are many possible solutions, but I'm not sure if they may be implemented with webmin. I suggest some of them (don't apply all, just any one).
1) Changing local domain name. What you should do in this case is configure another mail domain name 'localhost' is fine, then remove all mention of ''. Then check your /etc/mail/ that it have a line 'Cwlocalhost' and /etc/mail/local-host-names that it doesn't have ''.
2) Turning off mailer 'local'. I know how to do in in, but not in webmin. In just remove a line 'MAILER(local)dnl' and recreate
3) Using mailertables if they are configured. Usually mailertable is located in /etc/mail/mailertable. Here just include line ' smtp:exchange-ip-address' and rebuild mailertable.db.


Author Comment

ID: 18857626
I changed the hostname of the server to localhost. Does my sendmail config look correct?

Entry type Line in configuration file Move
Other divert(-1)dnl  
Other dnl #  
Other dnl # This is the sendmail macro config file for m4. If you make changes to  
Other dnl # /etc/mail/, you will need to regenerate the  
Other dnl # /etc/mail/ file by confirming that the sendmail-cf package is  
Other dnl # installed and then performing a  
Other dnl #  
Other dnl # make -C /etc/mail  
Other dnl #  
Other include(`/usr/share/sendmail-cf/m4/cf.m4')dnl  
Other VERSIONID(`setup for linux')dnl  
OS Type OSTYPE(`linux')dnl  
Other dnl #  
Other dnl # Do not advertize sendmail version.  
Other dnl #  
Other dnl define(`confSMTP_LOGIN_MSG', `$j Sendmail; $b')dnl  
Other dnl #  
Other dnl # default logging level is 9, you might want to set it higher to  
Other dnl # debug the configuration  
Other dnl #  
Other dnl define(`confLOG_LEVEL', `9')dnl  
Other dnl #  
Other dnl # Uncomment and edit the following line if your outgoing mail needs to  
Other dnl # be sent out through an external mail server:  
Other dnl #  
Define define(`SMART_HOST', `')dnl  
Other dnl #  
Define define(`confDEF_USER_ID', ``8:12'')dnl  
Other dnl define(`confAUTO_REBUILD')dnl  
Define define(`confTO_CONNECT', `1m')dnl  
Define define(`confTRY_NULL_MX_LIST', `True')dnl  
Define define(`confDONT_PROBE_INTERFACES', `True')dnl  
Define define(`PROCMAIL_MAILER_PATH', `/usr/bin/procmail')dnl  
Define define(`ALIAS_FILE', `/etc/aliases')dnl  
Define define(`STATUS_FILE', `/var/log/mail/statistics')dnl  
Define define(`UUCP_MAILER_MAX', `2000000')dnl  
Define define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl  
Define define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl  
Define define(`confAUTH_OPTIONS', `A')dnl  
Other dnl #  
Other dnl # The following allows relaying if the user authenticates, and disallows  
Other dnl # plaintext authentication (PLAIN/LOGIN) on non-TLS links  
Other dnl #  
Other dnl define(`confAUTH_OPTIONS', `A p')dnl  
Other dnl #  
Other dnl # PLAIN is the preferred plaintext authentication method and used by  
Other dnl # Mozilla Mail and Evolution, though Outlook Express and other MUAs do  
Other dnl # use LOGIN. Other mechanisms should be used if the connection is not  
Other dnl # guaranteed secure.  
Other dnl # Please remember that saslauthd needs to be running for AUTH.  
Other dnl #  
Other dnl #  
Other dnl # Rudimentary information on creating certificates for sendmail TLS:  
Other dnl # cd /usr/share/ssl/certs; make sendmail.pem  
Other dnl # Complete usage:  
Other dnl # make -C /usr/share/ssl/certs usage  
Other dnl #  
Other dnl define(`confCACERT_PATH', `/etc/pki/tls/certs')dnl  
Other dnl define(`confCACERT', `/etc/pki/tls/certs/ca-bundle.crt')dnl  
Other dnl define(`confSERVER_CERT', `/etc/pki/tls/certs/sendmail.pem')dnl  
Other dnl define(`confSERVER_KEY', `/etc/pki/tls/certs/sendmail.pem')dnl  
Other dnl #  
Other dnl # This allows sendmail to use a keyfile that is shared with OpenLDAP's  
Other dnl # slapd, which requires the file to be readble by group ldap  
Other dnl #  
Other dnl define(`confDONT_BLAME_SENDMAIL', `groupreadablekeyfile')dnl  
Other dnl #  
Other dnl define(`confTO_QUEUEWARN', `4h')dnl  
Other dnl define(`confTO_QUEUERETURN', `5d')dnl  
Other dnl define(`confQUEUE_LA', `12')dnl  
Other dnl define(`confREFUSE_LA', `18')dnl  
Define define(`confTO_IDENT', `0')dnl  
Other dnl FEATURE(delay_checks)dnl  
Feature FEATURE(`no_default_msa', `dnl')dnl  
Feature FEATURE(`smrsh', `/usr/sbin/smrsh')dnl  
Feature FEATURE(`mailertable', `hash -o /etc/mail/mailertable.db')dnl  
Feature FEATURE(`virtusertable', `hash -o /etc/mail/virtusertable.db')dnl  
Feature FEATURE(redirect)dnl  
Feature FEATURE(always_add_domain)dnl  
Feature FEATURE(use_cw_file)dnl  
Feature FEATURE(use_ct_file)dnl  
Other dnl #  
Other dnl # The following limits the number of processes sendmail can fork to accept  
Other dnl # incoming messages or process its message queues to 20.) sendmail refuses  
Other dnl # to accept connections once it has reached its quota of child processes.  
Other dnl #  
Other dnl define(`confMAX_DAEMON_CHILDREN', `20')dnl  
Other dnl #  
Other dnl # Limits the number of new connections per second. This caps the overhead  
Other dnl # incurred due to forking new sendmail processes. May be useful against  
Other dnl # DoS attacks or barrages of spam. (As mentioned below, a per-IP address  
Other dnl # limit would be useful but is not available as an option at this writing.)  
Other dnl #  
Other dnl define(`confCONNECTION_RATE_THROTTLE', `3')dnl  
Other dnl #  
Other dnl # The -t option will retry delivery if e.g. the user runs over his quota.  
Other dnl #  
Feature FEATURE(local_procmail, `', `procmail -t -Y -a $h -d $u')dnl  
Feature FEATURE(`access_db', `hash -T<TMPF> -o /etc/mail/access.db')dnl  
Feature FEATURE(`blacklist_recipients')dnl  
Other EXPOSED_USER(`root')dnl  
Other dnl #  
Other dnl # For using Cyrus-IMAPd as POP3/IMAP server through LMTP delivery uncomment  
Other dnl # the following 2 definitions and activate below in the MAILER section the  
Other dnl # cyrusv2 mailer.  
Other dnl #  
Other dnl define(`confLOCAL_MAILER', `cyrusv2')dnl  
Other dnl define(`CYRUSV2_MAILER_ARGS', `FILE /var/lib/imap/socket/lmtp')dnl  
Other dnl #  
Other dnl # The following causes sendmail to only listen on the IPv4 loopback address  
Other dnl # and not on any other network devices. Remove the loopback  
Other dnl # address restriction to accept email from the internet or intranet.  
Other dnl #  
Other DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl  
Other dnl #  
Other dnl # The following causes sendmail to additionally listen to port 587 for  
Other dnl # mail from MUAs that authenticate. Roaming users who can't reach their  
Other dnl # preferred sendmail daemon due to port 25 being blocked or redirected find  
Other dnl # this useful.  
Other dnl #  
Other dnl DAEMON_OPTIONS(`Port=submission, Name=MSA, M=Ea')dnl  
Other dnl #  
Other dnl # The following causes sendmail to additionally listen to port 465, but  
Other dnl # starting immediately in TLS mode upon connecting. Port 25 or 587 followed  
Other dnl # by STARTTLS is preferred, but roaming clients using Outlook Express can't  
Other dnl # do STARTTLS on ports other than 25. Mozilla Mail can ONLY use STARTTLS  
Other dnl # and doesn't support the deprecated smtps; Evolution <1.1.1 uses smtps  
Other dnl # when SSL is enabled-- STARTTLS support is available in version 1.1.1.  
Other dnl #  
Other dnl # For this to work your OpenSSL certificates must be configured.  
Other dnl #  
Other dnl DAEMON_OPTIONS(`Port=smtps, Name=TLSMTA, M=s')dnl  
Other dnl #  
Other dnl # The following causes sendmail to additionally listen on the IPv6 loopback  
Other dnl # device. Remove the loopback address restriction listen to the network.  
Other dnl #  
Other dnl DAEMON_OPTIONS(`port=smtp,Addr=::1, Name=MTA-v6, Family=inet6')dnl  
Other dnl #  
Other dnl # enable both ipv6 and ipv4 in sendmail:  
Other dnl #  
Other dnl DAEMON_OPTIONS(`Name=MTA-v4, Family=inet, Name=MTA-v6, Family=inet6')  
Other dnl #  
Other dnl # We strongly recommend not accepting unresolvable domains if you want to  
Other dnl # protect yourself from spam. However, the laptop and users on computers  
Other dnl # that do not have 24x7 DNS do need this.  
Other dnl #  
Feature FEATURE(`accept_unresolvable_domains')dnl  
Other dnl #  
Other dnl FEATURE(`relay_based_on_MX')dnl  
Other dnl #  
Other dnl # Also accept email sent to "localhost.localdomain" as local email.  
Other dnl #  
Other LOCAL_DOMAIN(`CSLWeb1')dnl  
Other dnl #  
Other dnl # The following example makes mail from this host and any additional  
Other dnl # specified domains appear to be sent from  
Other dnl #  
Other dnl MASQUERADE_AS(`')dnl  
Other dnl #  
Other dnl # masquerade not just the headers, but the envelope as well  
Other dnl #  
Other dnl FEATURE(masquerade_envelope)dnl  
Other dnl #  
Other dnl # masquerade not just, but @* as well  
Other dnl #  
Other dnl FEATURE(masquerade_entire_domain)dnl  
Other dnl #  
Other dnl MASQUERADE_DOMAIN(localhost)dnl  
Other dnl MASQUERADE_DOMAIN(localhost.localdomain)dnl  
Other dnl MASQUERADE_DOMAIN(mydomain.lan)dnl  
Mailer MAILER(`smtp')  
Mailer MAILER(procmail)dnl  
Other dnl MAILER(cyrusv2)dnl  
LVL 27

Accepted Solution

Nopius earned 2000 total points
ID: 18861776
This config file is similar to /etc/mail/, but not exactly the same, but it looks good.
I see you defined local host name by this definition: LOCAL_DOMAIN(`CSLWeb1')dnl  
So all mail that goes to user@CSLWeb1 should be treated as local mail. You may use 'localhost' instead.

Next check file /etc/mail/local-host-names and ensure that there is no line ''.
Then rebuild config and restart sendmail.

Author Comment

ID: 18872890
Thanks for the help!

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Join Greg Farro and Ethan Banks from Packet Pushers ( and Greg Ross from Paessler ( for a discussion about smart network …
As cyber crime continues to grow in both numbers and sophistication, a troubling trend of optimization has emerged over the last year.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…

664 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question