LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-29-2014, 02:37 PM   #1
cyberdome
Member
 
Registered: Mar 2014
Distribution: Fedora 23 - MariaDB 10.1 -
Posts: 130
Blog Entries: 2

Rep: Reputation: 8
sendmail is unable to get access to the outside world? unable to send email?


Hello everyone,


I have done everything I can in my Sendmail configuration. I am using Fedora 20, I used Yum to install sendmail and sendmail-cf.

I added port 25 in my IPtables. I have added 192.168.1 RELAY in my access file,

I have forwarded the port on my ROUTER. check and verified with port scanner. http://www.whatsmyip.org/port-scanner/server/

Done everything I could. Still when I am sending email to my personal yahoo email address. It shows up in my local user mail directory.

Does not show up in my yahoo inbox.

Code:
for example --> $ mail - "Hello" boss@yahoo.com  ( control+D )
this is test email (control+D)
I do get a message after executing the mail command to my yahoo email., that I have mail in my /var/spool/mail/user

I have added port in my IPTABLES. I have not mess with the sendmail.mc file yet. In the fedora tutorial, it says not to mess with the file. I may have to edit the sendmail.mc possibly.

http://docs.fedoraproject.org/en-US/...ndmail-changes


I did try some changes in the sendmail.mc file but it is still not sending out email to my yahoo inbox.

https://fedoraproject.org/wiki/Archi...erver/Sendmail

In my httpd.conf file my SERVERNAME directive is set to 192.168.1.3:80 which is my local ip given by my router.

I am stuck at this now. I have no idea where to look from here?

Any help is greatly appreciated.

Last edited by cyberdome; 03-29-2014 at 02:47 PM.
 
Old 03-29-2014, 06:01 PM   #2
Rawcous
Member
 
Registered: Jan 2014
Location: Farnborough, Hampshire - UK
Distribution: SCO UNIX -> Fedora (Core) -> CentOS -> RedHat
Posts: 128

Rep: Reputation: 48
Hello Cyberdome,

1. Presumably after editing the sendmail.mc file you have rebuilt the sendmail config by performing /etc/mail/make?
2. At the time of attempting to send mail have you checked /var/log/maillog for error messages?
3. Many ISPs in an attempt to reduce the volume of spam being relayed through them require that you specify an SMTP server through whom you are relaying mail. Most will require that that you specify the SMTP server of the ISP that you are connected to. Thus in your sendmail.mc file yuo should have an entry that corresponds to : dnl define(`SMART_HOST', `smtp.SMTP_SERVERNAME.com')dnl where SMTP_SEVERNAME relates to the SMTP server name of your ISP. If you are not sure of the STMP server name for your ISP simply Google "SMTP YourISP"
4. Oops - forgot to add - I am also assuming that after adding the Relay entry to the Access file you rebuilt the file using: makemap hash /etc/mail/access.db < /etc/mail/access

Regards,

Rawcous!

Last edited by Rawcous; 03-29-2014 at 06:46 PM. Reason: Rebuild of Sendmail Access file - point 4 added!
 
Old 03-29-2014, 07:56 PM   #3
cyberdome
Member
 
Registered: Mar 2014
Distribution: Fedora 23 - MariaDB 10.1 -
Posts: 130

Original Poster
Blog Entries: 2

Rep: Reputation: 8
Quote:
Originally Posted by Rawcous View Post
Hello Cyberdome,

1. Presumably after editing the sendmail.mc file you have rebuilt the sendmail config by performing /etc/mail/make?
2. At the time of attempting to send mail have you checked /var/log/maillog for error messages?
3. Many ISPs in an attempt to reduce the volume of spam being relayed through them require that you specify an SMTP server through whom you are relaying mail. Most will require that that you specify the SMTP server of the ISP that you are connected to. Thus in your sendmail.mc file yuo should have an entry that corresponds to : dnl define(`SMART_HOST', `smtp.SMTP_SERVERNAME.com')dnl where SMTP_SEVERNAME relates to the SMTP server name of your ISP. If you are not sure of the STMP server name for your ISP simply Google "SMTP YourISP"
4. Oops - forgot to add - I am also assuming that after adding the Relay entry to the Access file you rebuilt the file using: makemap hash /etc/mail/access.db < /etc/mail/access

Regards,

Rawcous!


Okay, thanks, I am setting up a Joomla Blog website. So, when anyone visits my blog and wants to register a account (just like setup at these Linux Forums). When they register, they will get a activation email from my server. But right now, It is not sending out emails. I register a dummy account on my blog and put my secondary email I have. did not go through. This is the end goal I am trying to do. So, changing the SMART HOST to my ISP.net , Would I need to provide my username and password, my ISP email address, and PORT # provided by my ISP?

thanks for the reply,

I noticed your running a EMAIL server yourself. Sendmail is very complicated and powerful program.


Quote:
Domain Mail & Web Server (Sendmail / Dovecot & Apache) - Centos 6.50
Domain FTP Server (PureFTP) - Centos 6.50

Last edited by cyberdome; 03-30-2014 at 01:13 AM.
 
Old 03-30-2014, 12:53 AM   #4
Rawcous
Member
 
Registered: Jan 2014
Location: Farnborough, Hampshire - UK
Distribution: SCO UNIX -> Fedora (Core) -> CentOS -> RedHat
Posts: 128

Rep: Reputation: 48
Hello,

Your ISP account details would only typically be required if say for example your server was connected to the internet via ISP A and you had user "JOHN" with your domain account who was trying to send / receive mail remotely whilst connected to the internet via ISP B - hope that make sense... In your case [B]SMART_HOST/B]would simply refer to the SMTP of your ISP - no account details would be required.

... and yes Sendmail is very powerful, along with Postfix being the most popular MTA's used - especially in real-life production environments.

See the following links, for example:

Sendmail Mailing lists:http://www.bga.org/~lessem/psyc5112/usail/mail/lists/

Sendmail Milters:https://www.milter.org/


Regards,

Rawcous!
 
Old 03-30-2014, 02:26 AM   #5
cyberdome
Member
 
Registered: Mar 2014
Distribution: Fedora 23 - MariaDB 10.1 -
Posts: 130

Original Poster
Blog Entries: 2

Rep: Reputation: 8
Quote:
Originally Posted by Rawcous View Post
Hello,

Your ISP account details would only typically be required if say for example your server was connected to the internet via ISP A and you had user "JOHN" with your domain account who was trying to send / receive mail remotely whilst connected to the internet via ISP B - hope that make sense... In your case [B]SMART_HOST/B]would simply refer to the SMTP of your ISP - no account details would be required.

... and yes Sendmail is very powerful, along with Postfix being the most popular MTA's used - especially in real-life production environments.

See the following links, for example:

Sendmail Mailing lists:http://www.bga.org/~lessem/psyc5112/usail/mail/lists/

Sendmail Milters:https://www.milter.org/


Regards,

Rawcous!

I have made the change in the sendmail.mc file, it is still not sending out emails to my YAHOO or GMAIL inbox. I am confused as to what I am doing wrong.
 
Old 03-30-2014, 03:41 AM   #6
Rawcous
Member
 
Registered: Jan 2014
Location: Farnborough, Hampshire - UK
Distribution: SCO UNIX -> Fedora (Core) -> CentOS -> RedHat
Posts: 128

Rep: Reputation: 48
Hello,

1. As mentioned after editing the sendmail.mc file perform /etc/mail/make
2. Whenever you have any issues in Linux, i.e things don't work always check the log files - in this case /var/log/maillog - post a segment here obtained at the time of attempting to send mail.
3. How are you trying to send mail from your mailserver?
4. Here's a copy of my sendmail.mc file

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 # /etc/mail/make
dnl #
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
VERSIONID(`setup for linux')dnl
OSTYPE(`linux')dnl
dnl #
dnl # Do not advertize sendmail version.
dnl #
dnl define(`confSMTP_LOGIN_MSG', `$j Sendmail; $b')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.ISPSmtpServer.com')dnl
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 # Please remember that saslauthd needs to be running for AUTH.
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 # cd /etc/pki/tls/certs; make sendmail.pem
dnl # Complete usage:
dnl # make -C /etc/pki/tls/certs usage
dnl #
dnl define(`confCACERT_PATH', `/etc/pki/tls/certs')dnl
dnl define(`confCACERT', `/etc/pki/tls/certs/ca-bundle.crt')dnl
dnl define(`confSERVER_CERT', `/etc/pki/tls/certs/sendmail.pem')dnl
dnl define(`confSERVER_KEY', `/etc/pki/tls/certs/sendmail.pem')dnl
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 following limits the number of processes sendmail can fork to accept
dnl # incoming messages or process its message queues to 20.) sendmail refuses
dnl # to accept connections once it has reached its quota of child processes.
dnl #
dnl define(`confMAX_DAEMON_CHILDREN', `20')dnl
dnl #
dnl # Limits the number of new connections per second. This caps the overhead
dnl # incurred due to forking new sendmail processes. May be useful against
dnl # DoS attacks or barrages of spam. (As mentioned below, a per-IP address
dnl # limit would be useful but is not available as an option at this writing.)
dnl #
dnl define(`confCONNECTION_RATE_THROTTLE', `3')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
FEATURE(`dnsbl',`zen.spamhaus.org',`"550 Mail from " $&{client_addr}" rejected - see http://www.spamhaus.org/"')dnl
dnl #
dnl # For using Cyrus-IMAPd as POP3/IMAP server through LMTP delivery uncomment
dnl # the following 2 definitions and activate below in the MAILER section the
dnl # cyrusv2 mailer.
dnl #
dnl define(`confLOCAL_MAILER', `cyrusv2')dnl
dnl define(`CYRUSV2_MAILER_ARGS', `FILE /var/lib/imap/socket/lmtp')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(`Name=MTA,Port=smtp')
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 #
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.DomainNameHere.co.uk')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(`DomainNameHere.co.uk')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
INPUT_MAIL_FILTER(`clamav', `S=local:/var/run/clamav/clamav-milter.sock, F=, T=S:4m;R:4m')dnl
define(`confINPUT_MAIL_FILTERS', `clamav')dnl
MAILER(smtp)dnl
MAILER(procmail)dnl
dnl MAILER(cyrusv2)dnl
define(`_FFR_MILTER', `true')
INPUT_MAIL_FILTER(`Synonym', `S=local:/var/run/synonym/synonym.sock, T=C:10m;S:1s;R:1s;E:5m')



1.smtp.ISPSmtpServer.com should be replaced with your ISP's SMTP server

2.DomainNameHere.co.uk should be replaced with your domain name

3.FEATURE(`dnsbl',`zen.spamhaus.org',`"550 Mail from " $&{client_addr}" rejected - see http://www.spamhaus.org/"')dnl performs a spam look up via the SpamHaus list to ensure any incoming mail does not contain any spam characteristics (see http://www.spamhaus.org/) - this is a nice to have, but is NOT needed to make sendmail work.

4.INPUT_MAIL_FILTER(`clamav', `S=local:/var/run/clamav/clamav-milter.sock, F=, T=S:4m;R:4m')dnl
define(`confINPUT_MAIL_FILTERS', `clamav')dnl
MAILER(smtp)dnl
MAILER(procmail)dnl
dnl MAILER(cyrusv2)dnl
define(`_FFR_MILTER', `true')
INPUT_MAIL_FILTER(`Synonym', `S=local:/var/run/synonym/synonym.sock, T=C:10m;S:1s;R:1s;E:5m')
This refers to 2 milters that I use - see my previous response on milters. Again this is a nice to have, but is NOT needed to make sendmail work.

Regards,

Rawcous!
 
Old 03-30-2014, 04:15 AM   #7
cyberdome
Member
 
Registered: Mar 2014
Distribution: Fedora 23 - MariaDB 10.1 -
Posts: 130

Original Poster
Blog Entries: 2

Rep: Reputation: 8
here is my sendmail.mc file, The only thing I changed in here is the SMART HOST to my ISP name.

define(`SMART_HOST', `smtp.isp.net')dnl


Code:
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 #     /etc/mail/make
dnl #
include(`/usr/share/sendmail-cf/m4/cf.m4')dnl
VERSIONID(`setup for linux')dnl
OSTYPE(`linux')dnl
dnl #
dnl # Do not advertize sendmail version.
dnl #
dnl define(`confSMTP_LOGIN_MSG', `$j Sendmail; $b')dnl
dnl #
dnl # default logging level is 9, you might want to set it higher to
dnl # debug the configuration
dnl #
define(`confLOG_LEVEL', `69')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 #
define(`SMART_HOST', `smtp.isp.net')dnl
define(`RELAY_MAILER_ARGS', `TCP $h 587')dnl
FEATURE(authinfo)dnl
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 # Please remember that saslauthd needs to be running for AUTH. 
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 #     cd /etc/pki/tls/certs; make sendmail.pem
dnl # Complete usage:
dnl #     make -C /etc/pki/tls/certs usage
dnl #
dnl define(`confCACERT_PATH', `/etc/pki/tls/certs')dnl
dnl define(`confCACERT', `/etc/pki/tls/certs/ca-bundle.crt')dnl
dnl define(`confSERVER_CERT', `/etc/pki/tls/certs/sendmail.pem')dnl
dnl define(`confSERVER_KEY', `/etc/pki/tls/certs/sendmail.pem')dnl
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 # If you're operating in a DSCP/RFC-4594 environment with QoS
dnl define(`confINET_QOS', `AF11')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 following limits the number of processes sendmail can fork to accept 
dnl # incoming messages or process its message queues to 20.) sendmail refuses 
dnl # to accept connections once it has reached its quota of child processes.
dnl #
dnl define(`confMAX_DAEMON_CHILDREN', `20')dnl
dnl #
dnl # Limits the number of new connections per second. This caps the overhead 
dnl # incurred due to forking new sendmail processes. May be useful against 
dnl # DoS attacks or barrages of spam. (As mentioned below, a per-IP address 
dnl # limit would be useful but is not available as an option at this writing.)
dnl #
dnl define(`confCONNECTION_RATE_THROTTLE', `3')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 # For using Cyrus-IMAPd as POP3/IMAP server through LMTP delivery uncomment
dnl # the following 2 definitions and activate below in the MAILER section the
dnl # cyrusv2 mailer.
dnl #
dnl define(`confLOCAL_MAILER', `cyrusv2')dnl
dnl define(`CYRUSV2_MAILER_ARGS', `FILE /var/lib/imap/socket/lmtp')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 #
dnl # DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, 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 #
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
dnl MAILER(cyrusv2)dnl
 
Old 03-30-2014, 04:17 AM   #8
cyberdome
Member
 
Registered: Mar 2014
Distribution: Fedora 23 - MariaDB 10.1 -
Posts: 130

Original Poster
Blog Entries: 2

Rep: Reputation: 8
here is the output for my sendmail service status. I am really confused what I am doing wrong?



systemctl status sendmail.service


Code:
sendmail.service - Sendmail Mail Transport Agent
   Loaded: loaded (/usr/lib/systemd/system/sendmail.service; enabled)
   Active: active (running) since Sun 2014-03-30 02:40:19 CDT; 13min ago
  Process: 7039 ExecStart=/usr/sbin/sendmail -bd $SENDMAIL_OPTS $SENDMAIL_OPTARG (code=exited, status=0/SUCCESS)
  Process: 7034 ExecStartPre=/etc/mail/make aliases (code=exited, status=0/SUCCESS)
  Process: 7031 ExecStartPre=/etc/mail/make (code=exited, status=0/SUCCESS)
 Main PID: 7041 (sendmail)
   CGroup: /system.slice/sendmail.service
           └─7041 sendmail: accepting connection

Mar 30 02:42:19  sendmail[7042]: s2TIWngn021353: to=<@yahoo.com>, ctladdr=<> (1000/1000), delay=13:09:29, xdelay=00:00:00, mailer=relay, pri=840471, relay=smtp..net., dsn=4.0.0, stat=Deferred: Connection timed out with smtp..net.
Mar 30 02:42:19 fedoraserver sendmail[7042]: s2TIWnh3021353: to=<@yahoo.com>, ctladdr=<
> (1000/1000), delay=13:09:28, xdelay=00:00:00, mailer=relay, pri=840477, relay=smtp.verizon.net., dsn=4.0.0, stat=Deferred: Connection timed out with smtp.isp.net.
Mar 30 02:42:19 fedoraserver sendmail[7042]: s2TIWngf021353: to=<@yahoo.com>, ctladdr=
<> (1000/1000), delay=13:09:29, xdelay=00:00:00, mailer=relay, pri=840478, relay=smtp.verizon.net., dsn=4.0.0, stat=Deferred: Connection timed out with smtp.isp.net.
Mar 30 02:42:19 l[7042]: s2TIxewN022196: to=<@yahoo.com>, ctladdr=<@ (1000/1000), delay=12:42:39, xdelay=00:00:00, mailer=relay, pri=840561, relay=smtp.isp.net., dsn=4.0.0, stat=Deferred: Connection timed out with smtp..net.
Mar 30 02:42:27  sendmail[7146]: s2U7fRuY007144: makeconnection (smtp.isp.net. []) failed: Connection timed out with smtp.isp.net.
Mar 30 02:42:36  sendmail[7160]: s2U7fa4H007158: makeconnection (smtp..net. [) failed: Connection timed out with smtp..net.
Mar 30 02:43:27 sendmail[7146]: s2U7fRuY007144: makeconnection (smtp..net. []) failed: Connection timed out with smtp..net.
Mar 30 02:43:27  sendmail[7146]: s2U7fRuY007144: to=<@gmail.com>, ctladdr= (1000/1000), delay=00:02:00, xdelay=00:02:00, mailer=relay, pri=120494, relay=smtp..net. ], dsn=4.0.0, stat=Deferred: Connection timed out with smtp.ispnet.
Mar 30 02:43:36 sendmail[7160]: s2U7fa4H007158: makeconnection (smtp.verizon.net. []) failed: Connection timed out with smtp..net.
Mar 30 02:43:36  sendmail[7160]: s2U7fa4H007158: to=<@yahoo.com>, ctladdr=> (1000/1000), delay=00:02:00, xdelay=00:02:00, mailer=relay, pri=120476, relay=smtp.isp.net. [], dsn=4.0.0, stat=Deferred: Connection timed out with smtp.isp.net.
 
Old 03-30-2014, 04:57 AM   #9
Rawcous
Member
 
Registered: Jan 2014
Location: Farnborough, Hampshire - UK
Distribution: SCO UNIX -> Fedora (Core) -> CentOS -> RedHat
Posts: 128

Rep: Reputation: 48
Hello,

Quote:
define(`SMART_HOST', `smtp.isp.net')dnl
define(`RELAY_MAILER_ARGS', `TCP $h 587')dnl

Quote:
Connection timed out with smtp.isp.net
- entry from your maillog file

1. via the command prompt can you ping smtp.isp.net? or do you also receive a timeout? If it's smtp.verizon.net then I also receive a timeout - however this could simply be due to the servers being configured to block responses to ping requests.

2. If smtp.verizon.net is your smtp server see here: http://www.verizon.com/Support/Resid...sone/86782.htm This page indicates verizon are using port 465 - so replace 587 above with 465

Regards,

Rawcous!
 
Old 03-30-2014, 05:08 AM   #10
cyberdome
Member
 
Registered: Mar 2014
Distribution: Fedora 23 - MariaDB 10.1 -
Posts: 130

Original Poster
Blog Entries: 2

Rep: Reputation: 8
1. As mentioned after editing the sendmail.mc file perform /etc/mail/make

I have done that.

2. Whenever you have any issues in Linux, i.e things don't work always check the log files - in this case /var/log/maillog - post a segment here obtained at the time of attempting to send mail.

I don't have a /var/log/maillog file. That is why I am unable to post output of a log file. I am running Fedora 20 with SELinux. So, I don't know where the file is? The only thing I found /var/log/mail/statistics file? when I do cat statistics. it shows nothing but jibberish.

3. How are you trying to send mail from your mailserver?

I am using the command shell from the linux server terminal window. I run the command.

mail -s "hello world" user@yahoo.com (control+D)
hello (control+D)
EOT

Last edited by cyberdome; 03-30-2014 at 05:18 AM.
 
Old 03-30-2014, 05:20 AM   #11
Rawcous
Member
 
Registered: Jan 2014
Location: Farnborough, Hampshire - UK
Distribution: SCO UNIX -> Fedora (Core) -> CentOS -> RedHat
Posts: 128

Rep: Reputation: 48
Looks like you missed my last response:

Quote:
Hello,


define(`SMART_HOST', `smtp.isp.net')dnl
define(`RELAY_MAILER_ARGS', `TCP $h 587')dnl


Connection timed out with smtp.isp.net
- entry from your maillog file

1. via the command prompt can you ping smtp.isp.net? or do you also receive a timeout? If it's smtp.verizon.net then I also receive a timeout - however this could simply be due to the servers being configured to block responses to ping requests.

2. If smtp.verizon.net is your smtp server see here: http://www.verizon.com/Support/Resid...sone/86782.htm This page indicates verizon are using port 465 - so replace 587 above with 465

Regards,

Rawcous!
Rawcous!
 
Old 03-30-2014, 05:39 AM   #12
cyberdome
Member
 
Registered: Mar 2014
Distribution: Fedora 23 - MariaDB 10.1 -
Posts: 130

Original Poster
Blog Entries: 2

Rep: Reputation: 8
Quote:
Originally Posted by Rawcous View Post
Looks like you missed my last response:



Rawcous!
sorry about this. I changed it to 465, I send a email using command line. it says connection reset by isp.net.

30 05:28:25 fedoraserver sendmail[14425]: s2U1F4DV004591: to=<>, ctladdr=<> (1000/1000), delay=09:13:21, xdelay=00:00:00, mailer=relay, pri=1290507, relay=smtp..net., dsn=4.0.0, stat=Deferred: Connection reset by smtp..net.

I have no idea what I am doing wrong. If using 465, does my server need to setup SSL certificate. I have not setup the server for SSL.

Last edited by cyberdome; 03-30-2014 at 05:40 AM.
 
Old 03-30-2014, 05:43 AM   #13
cyberdome
Member
 
Registered: Mar 2014
Distribution: Fedora 23 - MariaDB 10.1 -
Posts: 130

Original Poster
Blog Entries: 2

Rep: Reputation: 8
here is the output for my sendmail port

netstat -ntlp | grep sendmail


tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 14424/sendmail: acc
 
Old 03-30-2014, 07:17 AM   #14
Rawcous
Member
 
Registered: Jan 2014
Location: Farnborough, Hampshire - UK
Distribution: SCO UNIX -> Fedora (Core) -> CentOS -> RedHat
Posts: 128

Rep: Reputation: 48
Hello,

As per the link 465 is a direct replacement for 25. SSL would typically be on port 587.

You mentioned you don't have a /var/log/maillog but indicated that you have /var/log/mail/statistics file containing:
Quote:
nothing but jibberish.
so presumably it's this file that contains:

Quote:
to=<@yahoo.com>, ctladdr=<> (1000/1000), delay=13:09:29, xdelay=00:00:00, mailer=relay, pri=840471, relay=smtp..net., dsn=4.0.0, stat=Deferred: Connection timed out with smtp..net.
Mar 30 02:42:19 fedoraserver sendmail[7042]: s2TIWnh3021353: to=<@yahoo.com>, ctladdr=<
> (1000/1000), delay=13:09:28, xdelay=00:00:00, mailer=relay, pri=840477, relay=smtp.verizon.net., dsn=4.0.0, stat=Deferred: Connection timed out with smtp.isp.net.
Mar 30 02:42:19 fedoraserver sendmail[7042]: s2TIWngf021353: to=<@yahoo.com>, ctladdr=
<> (1000/1000), delay=13:09:29, xdelay=00:00:00, mailer=relay, pri=840478, relay=smtp.verizon.net., dsn=4.0.0, stat=Deferred: Connection timed out with smtp.isp.net.
Mar 30 02:42:19 l[7042]: s2TIxewN022196: to=<@yahoo.com>, ctladdr=<@ (1000/1000), delay=12:42:39, xdelay=00:00:00, mailer=relay, pri=840561, relay=smtp.isp.net., dsn=4.0.0, stat=Deferred: Connection timed out with smtp..net.
Mar 30 02:42:27 sendmail[7146]: s2U7fRuY007144: makeconnection (smtp.isp.net. []) failed: Connection timed out with smtp.isp.net.
Mar 30 02:42:36 sendmail[7160]: s2U7fa4H007158: makeconnection (smtp..net. [) failed: Connection timed out with smtp..net.
Mar 30 02:43:27 sendmail[7146]: s2U7fRuY007144: makeconnection (smtp..net. []) failed: Connection timed out with smtp..net.
Mar 30 02:43:27 sendmail[7146]: s2U7fRuY007144: to=<@gmail.com>, ctladdr= (1000/1000), delay=00:02:00, xdelay=00:02:00, mailer=relay, pri=120494, relay=smtp..net. ], dsn=4.0.0, stat=Deferred: Connection timed out with smtp.ispnet.
Mar 30 02:43:36 sendmail[7160]: s2U7fa4H007158: makeconnection (smtp.verizon.net. []) failed: Connection timed out with smtp..net.
Mar 30 02:43:36 sendmail[7160]: s2U7fa4H007158: to=<@yahoo.com>, ctladdr=> (1000/1000), delay=00:02:00, xdelay=00:02:00, mailer=relay, pri=120476, relay=smtp.isp.net. [], dsn=4.0.0, stat=Deferred: Connection timed out with smtp.isp.net.
and:

Quote:
30 05:28:25 fedoraserver sendmail[14425]: s2U1F4DV004591: to=<>, ctladdr=<> (1000/1000), delay=09:13:21, xdelay=00:00:00, mailer=relay, pri=1290507, relay=smtp..net., dsn=4.0.0, stat=Deferred: Connection reset by smtp..net
As you have amended and rebuilt the sendmail.mc to include the change of outbound smtp port from to 465, I recommend that you restart the sendmail service to reflect the change if you haven't already done so - otherwise the 2 may conflict.

systemctl restart sendmail.service

Rawcous!
 
Old 03-30-2014, 11:02 AM   #15
cyberdome
Member
 
Registered: Mar 2014
Distribution: Fedora 23 - MariaDB 10.1 -
Posts: 130

Original Poster
Blog Entries: 2

Rep: Reputation: 8
here is the output for

systemctl status sendmail.service.

Code:
systemctl status sendmail.service -l
sendmail.service - Sendmail Mail Transport Agent
   Loaded: loaded (/usr/lib/systemd/system/sendmail.service; enabled)
   Active: active (running) since Sun 2014-03-30 10:55:40 CDT; 3min 59s ago
  Process: 16300 ExecStart=/usr/sbin/sendmail -bd $SENDMAIL_OPTS $SENDMAIL_OPTARG (code=exited, status=0/SUCCESS)
  Process: 16295 ExecStartPre=/etc/mail/make aliases (code=exited, status=0/SUCCESS)
  Process: 16293 ExecStartPre=/etc/mail/make (code=exited, status=0/SUCCESS)
 Main PID: 16301 (sendmail)
   CGroup: /system.slice/sendmail.service
           ├─16301 sendmail: accepting connection
           └─16302 sendmail: ./s2UA9XT2013622 smtp.verizon.net.: client greetin

Mar 30 10:55:40 fedoraserver sendmail[16301]: starting daemon (8.14.8): SMTP+queueing@01:00:00
Mar 30 10:55:40 fedoraserver systemd[1]: Started Sendmail Mail Transport Agent.
Mar 30 10:57:40 fedoraserver sendmail[16218]: s2UA9XT2013622: timeout waiting for input from smtp.verizon.net. during client QUIT
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to send email with sendmail from PHP 5.3 on CentOS VM crmpicco Linux - Newbie 1 02-14-2014 07:42 AM
[SOLVED] Unable to send email to-from localhost in Sendmail Rohit_4739 Linux - Server 6 06-27-2012 11:28 PM
Sendmail: unable to send and recive email in intranet nikhilgeo Red Hat 3 06-22-2011 12:30 AM
Sendmail - mail server rejected email and unable to send ghostplanet Linux - Server 4 02-24-2010 10:10 PM
Unable to send email from Sendmail rridler Linux - Software 26 07-13-2006 01:23 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:01 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration