Solved

Sendmail will send out but not receive

Posted on 2004-09-23
6
719 Views
Last Modified: 2013-12-18
Hello:

I am so close to getting one on my server complete, here is where I stand. I can send out from sendmail but cannot not receive. I am going to post my config files and if someone could fill me in on where I am screwing up. I have checked everything 100 times. I am new to linux so please go easy on me for stupidity.

------------
resolv.conf

; generated by /sbin/dhclient-script
search wilmsc01.tn.comcast.net
nameserver 68.52.0.6
nameserver 68.52.0.5
domain clj.ath.cx
---------------------
hosts

# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1               localhost.localdomain localhost
192.168.123.154         clj.ath.cx              clj
------------------
/etc/sysconfig/network

NETWORKING=yes
DOMAINNAME=clj.ath.cx
GATEWAY=192.168.123.254
GATEWAY_IF=eth0
------------------------
/etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
ONBOOT=yes

NETMASK=255.255.255.0
GATEWAY=192.168.123.254
TYPE=Ethernet
IPADDR=192.168.123.154
----------------------------------

sendmail.mc( please disregard the other commands, it is a copy from webmin )

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/sendmail.mc, you will need to regenerate the  
Other dnl # /etc/mail/sendmail.cf 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 Red Hat Linux')dnl  
OS Type OSTYPE(`linux')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 #  
Other dnl define(`SMART_HOST',`smtp.your.provider')  
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 #  
Other dnl TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl  
Other dnl define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl  
Other dnl #  
Other dnl # Rudimentary information on creating certificates for sendmail TLS:  
Other dnl # make -C /usr/share/ssl/certs usage  
Other dnl # or use the included makecert.sh script  
Other dnl #  
Other dnl define(`confCACERT_PATH',`/usr/share/ssl/certs')  
Other dnl define(`confCACERT',`/usr/share/ssl/certs/ca-bundle.crt')  
Other dnl define(`confSERVER_CERT',`/usr/share/ssl/certs/sendmail.pem')  
Other dnl define(`confSERVER_KEY',`/usr/share/ssl/certs/sendmail.pem')  
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 -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 # The following causes sendmail to only listen on the IPv4 loopback address  
Other dnl # 127.0.0.1 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(`localhost.localdomain')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 mydomain.com  
Other dnl #  
Other dnl MASQUERADE_AS(`mydomain.com')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 @mydomainalias.com, but @*.mydomainalias.com 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(mydomainalias.com)dnl  
Other dnl MASQUERADE_DOMAIN(mydomain.lan)dnl  
Mailer MAILER(smtp)dnl  
Mailer MAILER(procmail)dnl


0
Comment
Question by:nashsupport
  • 3
  • 2
6 Comments
 
LVL 40

Expert Comment

by:jlevie
ID: 12138549
Please post the result of 'cat /etc/mail/sendmail.mc'
0
 

Author Comment

by:nashsupport
ID: 12138787
[root@clj mail]# cat -A /etc/mail/sendmail.mc
divert(-1)dnl$
dnl #$
dnl # This is the sendmail macro config file for m4. If you make changes to$
dnl # /etc/mail/sendmail.mc, you will need to regenerate the$
dnl # /etc/mail/sendmail.cf file by confirming that the sendmail-cf package is$
dnl # installed and then performing a$
dnl #$
dnl #     make -C /etc/mail$
dnl #$
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl$
VERSIONID(`setup for Red Hat Linux')dnl$
OSTYPE(`linux')dnl$
dnl #$
dnl # default logging level is 9, you might want to set it higher to$
dnl # debug the configuration$
dnl #$
dnl define(`confLOG_LEVEL', `9')dnl$
dnl #$
dnl # Uncomment and edit the following line if your outgoing mail needs to$
dnl # be sent out through an external mail server:$
dnl #$
dnl define(`SMART_HOST',`smtp.your.provider')$
dnl #$
define(`confDEF_USER_ID',``8:12'')dnl$
dnl define(`confAUTO_REBUILD')dnl$
define(`confTO_CONNECT', `1m')dnl$
define(`confTRY_NULL_MX_LIST',true)dnl$
define(`confDONT_PROBE_INTERFACES',true)dnl$
define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')dnl$
define(`ALIAS_FILE', `/etc/aliases')dnl$
define(`STATUS_FILE', `/var/log/mail/statistics')dnl$
define(`UUCP_MAILER_MAX', `2000000')dnl$
define(`confUSERDB_SPEC', `/etc/mail/userdb.db')dnl$
define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl$
define(`confAUTH_OPTIONS', `A')dnl$
dnl #$
dnl # The following allows relaying if the user authenticates, and disallows$
dnl # plaintext authentication (PLAIN/LOGIN) on non-TLS links$
dnl #$
dnl define(`confAUTH_OPTIONS', `A p')dnl$
dnl # $
dnl # PLAIN is the preferred plaintext authentication method and used by$
dnl # Mozilla Mail and Evolution, though Outlook Express and other MUAs do$
dnl # use LOGIN. Other mechanisms should be used if the connection is not$
dnl # guaranteed secure.$
dnl #$
dnl TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl$
dnl define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl$
dnl #$
dnl # Rudimentary information on creating certificates for sendmail TLS:$
dnl #     make -C /usr/share/ssl/certs usage$
dnl # or use the included makecert.sh script $
dnl #$
dnl define(`confCACERT_PATH',`/usr/share/ssl/certs')$
dnl define(`confCACERT',`/usr/share/ssl/certs/ca-bundle.crt')$
dnl define(`confSERVER_CERT',`/usr/share/ssl/certs/sendmail.pem')$
dnl define(`confSERVER_KEY',`/usr/share/ssl/certs/sendmail.pem')$
dnl #$
dnl # This allows sendmail to use a keyfile that is shared with OpenLDAP's$
dnl # slapd, which requires the file to be readble by group ldap$
dnl #$
dnl define(`confDONT_BLAME_SENDMAIL',`groupreadablekeyfile')dnl$
dnl #$
dnl define(`confTO_QUEUEWARN', `4h')dnl$
dnl define(`confTO_QUEUERETURN', `5d')dnl$
dnl define(`confQUEUE_LA', `12')dnl$
dnl define(`confREFUSE_LA', `18')dnl$
define(`confTO_IDENT', `0')dnl$
dnl FEATURE(delay_checks)dnl$
FEATURE(`no_default_msa',`dnl')dnl$
FEATURE(`smrsh',`/usr/sbin/smrsh')dnl$
FEATURE(`mailertable',`hash -o /etc/mail/mailertable.db')dnl$
FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable.db')dnl$
FEATURE(redirect)dnl$
FEATURE(always_add_domain)dnl$
FEATURE(use_cw_file)dnl$
FEATURE(use_ct_file)dnl$
dnl #$
dnl # The -t option will retry delivery if e.g. the user runs over his quota.$
dnl #$
FEATURE(local_procmail,`',`procmail -t -Y -a $h -d $u')dnl$
FEATURE(`access_db',`hash -T<TMPF> -o /etc/mail/access.db')dnl$
FEATURE(`blacklist_recipients')dnl$
EXPOSED_USER(`root')dnl$
dnl #$
dnl # The following causes sendmail to only listen on the IPv4 loopback address$
dnl # 127.0.0.1 and not on any other network devices. Remove the loopback$
dnl # address restriction to accept email from the internet or intranet.$
dnl #$
DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl$
dnl #$
dnl # The following causes sendmail to additionally listen to port 587 for$
dnl # mail from MUAs that authenticate. Roaming users who can't reach their$
dnl # preferred sendmail daemon due to port 25 being blocked or redirected find$
dnl # this useful.$
dnl #$
dnl DAEMON_OPTIONS(`Port=submission, Name=MSA, M=Ea')dnl$
dnl #$
dnl # The following causes sendmail to additionally listen to port 465, but$
dnl # starting immediately in TLS mode upon connecting. Port 25 or 587 followed$
dnl # by STARTTLS is preferred, but roaming clients using Outlook Express can't$
dnl # do STARTTLS on ports other than 25. Mozilla Mail can ONLY use STARTTLS$
dnl # and doesn't support the deprecated smtps; Evolution <1.1.1 uses smtps$
dnl # when SSL is enabled-- STARTTLS support is available in version 1.1.1.$
dnl #$
dnl # For this to work your OpenSSL certificates must be configured.$
dnl #$
dnl DAEMON_OPTIONS(`Port=smtps, Name=TLSMTA, M=s')dnl$
dnl #$
dnl # The following causes sendmail to additionally listen on the IPv6 loopback$
dnl # device. Remove the loopback address restriction listen to the network.$
dnl #$
dnl DAEMON_OPTIONS(`port=smtp,Addr=::1, Name=MTA-v6, Family=inet6')dnl$
dnl #$
dnl # enable both ipv6 and ipv4 in sendmail:$
dnl #$
dnl DAEMON_OPTIONS(`Name=MTA-v4, Family=inet, Name=MTA-v6, Family=inet6')$
dnl #$
dnl # We strongly recommend not accepting unresolvable domains if you want to$
dnl # protect yourself from spam. However, the laptop and users on computers$
dnl # that do not have 24x7 DNS do need this.$
dnl #$
FEATURE(`accept_unresolvable_domains')dnl$
dnl #$
dnl FEATURE(`relay_based_on_MX')dnl$
dnl # $
dnl # Also accept email sent to "localhost.localdomain" as local email.$
dnl # $
LOCAL_DOMAIN(`localhost.localdomain')dnl$
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_AS(`mydomain.com')dnl$
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$
dnl MASQUERADE_DOMAIN(mydomainalias.com)dnl$
dnl MASQUERADE_DOMAIN(mydomain.lan)dnl$
MAILER(smtp)dnl$
MAILER(procmail)dnl$
0
 
LVL 40

Expert Comment

by:jlevie
ID: 12139306
If that's a paste to a comment in a browser running on RHEL I'd say that webmin (or something) has already trashed it because of the $ at the ends of the lines.

But anyways... The problem right now is that the mc file contains:

DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl

which would have originally read:

DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl

To function as a mail server able to receive external emails that line needs to be commented out, like so:

dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl

This is covered in the Release Notes on the 1st CD and implied (if not exactly stated as such) by the comments that preceed that line.

Not to worry, it is a common mistake to attempt to modify the line rather than commenting it out.
0
Do email signature updates give you a headache?

Do you feel like all of your time is spent managing email signatures? Too busy to visit every user’s desk to make updates? Want high-quality HTML signatures on all devices, including on mobiles and Macs? Then, let Exclaimer solve all your email signature problems today!

 

Author Comment

by:nashsupport
ID: 12141833
I will try that, do my other config files look ok such as resolv.conf and such above.

thanks
0
 
LVL 40

Expert Comment

by:jlevie
ID: 12142644
Yep.
0
 
LVL 13

Accepted Solution

by:
rhinoceros earned 250 total points
ID: 12167684
Try it
1. open the file /etc/sendmail.cf
Change the Addr=127.0.0.1 -> Addr=0.0.0.0

2. /etc/hosts.allow
Add "sendmail:ALL"

3. open the file /etc/mail/access
Add "192.168.123  Relay"

4. Service sendmail restart

I hope it can help.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

MS outlook is a premier email client that enable you to send and receive the e-mails with various file formats of attachments such as document files, media file, and many others formats. There is some scenario occurs when a receiver of an e-mail mes…
Granting full access permission allows users to access mailboxes present in their database. By giving full access permission one can open and read the content of any mailbox but cannot send emails from that mailbox.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
To show how to create a transport rule in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Rules tab.:  To cr…

760 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now