Page 1 of 1
[SOLVED] sendmail - GoDaddy and Comcast

Posted:
Sep 29th, '13, 02:50
by DaveInFL
I am having some problems with sendmail. I've tried to send several emails out to different email addresses but none are getting though and I don't know why. I haven't done anything to sendmail apart from install it.
Also, I am not seeing any log files. Nothing under /var/log and there's no /var/log/mail directory either.
Can someone please help me troubleshoot this?
Re: sendmail

Posted:
Sep 29th, '13, 11:22
by Lebarhon
Hello,
From bug 4131:
journald is default logger as of Mageia 3.
To see the logs, use journalctl command, for example "journalctl -b" to see all logs since last boot, and so on... see man journalctl for how to use.
rsyslog is still provided as an option for those that want old style logging, but it wont be installed by default.
Re: sendmail

Posted:
Sep 29th, '13, 14:36
by DaveInFL
Thanks for that info, at least I can now see what is going on.
So, I think the main issue is that mail is being sent but it's going nowhere and I think I need to define (not sure where) the SMTP server I wish to use and what my username/password is for that SMTP server.
Re: sendmail

Posted:
Sep 30th, '13, 00:43
by DaveInFL
Ok, need some help here. Trying to set up sendmail from my local linux box such that it will send emails out (no need to receive emails to be honest) using my ISP's SMTP server, that I have a login and password for.
Right now (after reading many articles on the web) I have gotten to the point (and am very confused) where I am getting the message:
DSN: Service unavailable.
All I really want sendmail to do is to send status emails from my server to my personal email. So, here is what I have done to date.
Added the following lines to sendmail.mc
define('SMART_HOST','[my.smtpserver.com]')
FEATURE('authinfo')
MASQUERADE_AS('mydomain.com')
FEATURE('masquerade_envelope')
FEATURE('masquerade_entire_domain')
FEATURE('access_db', hash -T<TMPF> -o /etc/mail/access.db')
DEAMON_OPTIONS('Port=smtp, Name=MTA')
All the above I got from various web searches so it's very possible that I don't even need some of the above.
Create the file access with the following lines:
mydomain.com RELAY
localhost RELAY
Created the authinfo file with my username and password for my.smtpserver.com.
Then I ran the following commands:-
m4 /etc/mail/sendmail.mc > /etc/mail/sendmail.cf
makemap -r hash /etc/mail/access.db < /etc/mail/access
makemap -r hash /etc/mail/authinfo.db < /etc/mail/authinfo
/sbin/service sendmail restart
From what I can see it is getting relayed from the localhost ok, but when getting relayed to my.smtpserver.com is where the DNS: Service unavailble error is showing. I've gone through numerous posting on this and am at a loss. Some post talk about the dig command, but I could not find this in Mageia or the repositories.
Would very much appreciate any help on this.
Re: sendmail

Posted:
Oct 2nd, '13, 09:28
by nigelc
Hi,
Have you set the hostname?
I can send the mail command to a gmail account.
Re: sendmail

Posted:
Oct 2nd, '13, 10:35
by wintpe
Dave
I think you need to define smarthost in your /etc/mail/sendmail.mc before you run make, to produce the sendmail.cf
this defines where sendmail connects to as the next hop to send your mail.
this could be a local mailhost or your ISP's
define(`SMART_HOST',`smarthost.example.com')dnl
but that smarthost is defined via an MX record, and therefore become multiple hosts to try
so for example the smarthost for microsoft.com are found with
nslookup
>set q=MX
>microsoft.com
Server:
Address:
Non-authoritative answer:
microsoft.com mail exchanger = 10 microsoft-com.mail.protection.outlook.com.
so in that case microsoft.com would be the smarthost.
also if you only want the host to listen on the locahost address, so that it cant be used as a relay, then add the option
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')
in place of the similar one you have
to your sendmail.mc
hope this points you in the right direction.
However also look at postfix, as this makes smtp configuration (IMHO) much easier to grasp
that uses the Transfer map to define the next hop
regards peter
Re: sendmail

Posted:
Oct 2nd, '13, 12:15
by DaveInFL
Thanks for the reply. I did actually figure out what was happening. My email is hosted by GoDaddy but my ISP is Comcast. Seems that Comcast block port 25 going out, which is the SMTP port for GoDaddy. So, I switched to the Comcast SMTP server and it's working now.