I need to setup a small mail server on a local network. It only needs SMTP ability as it's just so Asterisk can send out emails. The machine has sendmail installed. My primary mail server seems to be rejecting the messages. Some research says something isn't configured properly. What do I have to do so the outside world accepts emails from my Asterisk box? It is behind a NAT. ---------- Mike Hammett Intelligent Computing Solutions http://www.ics-il.com -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20080313/ecd53c9b/attachment.htm
Mike Hammett wrote:> I need to setup a small mail server on a local network. It only needs > SMTP ability as it's just so Asterisk can send out emails. The machine > has sendmail installed. My primary mail server seems to be rejecting > the messages. Some research says something isn't configured properly. > What do I have to do so the outside world accepts emails from my > Asterisk box? It is behind a NAT.On the mail server machine add the IP address or name of the asterisk box to /etc/mail/relay-domains and restart sendmail. Steve
On Thu, Mar 13, 2008 at 4:04 PM, Mike Hammett <asterisk-users at ics-il.net> wrote:> > I need to setup a small mail server on a local network. It only needs SMTP > ability as it's just so Asterisk can send out emails. The machine has > sendmail installed. My primary mail server seems to be rejecting the > messages. Some research says something isn't configured properly. What do > I have to do so the outside world accepts emails from my Asterisk box? It > is behind a NAT.Does your ISP provide an SMTP server you can use? If so, it's usually easiest to set that up as a "smarthost" and tell sendmail to send through that server. If this isn't an option, you need to make sure that your asterisk server has a valid publicly-available DNS record (and reverse DNS). That's most likely the reason the remote server is rejecting these emails. -erik
Mike Hammett wrote:> I need to setup a small mail server on a local network. It only needs > SMTP ability as it's just so Asterisk can send out emails. The machine > has sendmail installed. My primary mail server seems to be rejecting > the messages. Some research says something isn't configured properly. > What do I have to do so the outside world accepts emails from my > Asterisk box? It is behind a NAT. > > > ---------- > Mike Hammett > Intelligent Computing Solutions > http://www.ics-il.com >I would look at the log file or use wireshark to capture the conversation. As I recall sendmail has logs in /var/log/maillog A couple of things to look for; 1. Firewall blocking port 25 2. Relaying denied based on domain name or ip address 3. DNS setup incorrectly John
Through help from people on the lists and then further investigation based on those results, here is what I did. 1) I set the office to a statically assigned IP instead of from the pool. 2) I made an A entry on one of my domains aiur.ics-il.net (where aiur is the machine name). 3) I added aiur.ics-il.net directly after 127.0.0.1 in the /etc/hosts file (copied below). 4) I set the from email address (serveremail) in /etc/asterisk/voicemail.conf to something at the domain I created (voicemail at aiur.ics-il.net). 5) Presto! [root at Aiur ~]# cat /etc/hosts # Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 aiur.ics-il.net Aiur localhost.localdomain localhost ::1 localhost6.localdomain6 localhost6 ---------- Mike Hammett Intelligent Computing Solutions http://www.ics-il.com ----- Original Message ----- From: Mike Hammett To: Asterisk Users Mailing List - Non-Commercial Discussion Sent: Thursday, March 13, 2008 4:04 PM Subject: [asterisk-users] Mail Server I need to setup a small mail server on a local network. It only needs SMTP ability as it's just so Asterisk can send out emails. The machine has sendmail installed. My primary mail server seems to be rejecting the messages. Some research says something isn't configured properly. What do I have to do so the outside world accepts emails from my Asterisk box? It is behind a NAT. ---------- Mike Hammett Intelligent Computing Solutions http://www.ics-il.com ------------------------------------------------------------------------------ _______________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20080313/3b1c1a50/attachment.htm
tail /var/log/mail or /var/log/maillog On Thu, Mar 13, 2008 at 5:04 PM, Mike Hammett <asterisk-users at ics-il.net> wrote:> > > I need to setup a small mail server on a local network. It only needs SMTP > ability as it's just so Asterisk can send out emails. The machine has > sendmail installed. My primary mail server seems to be rejecting the > messages. Some research says something isn't configured properly. What do > I have to do so the outside world accepts emails from my Asterisk box? It > is behind a NAT. > > > ---------- > Mike Hammett > Intelligent Computing Solutions > http://www.ics-il.com > > > _______________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >