Sendmail is a popular Mail Transfer Agent (MTA) that is installed by default on most Linux/UNIX systems. It only delivers mail to other services running locally or to other remote systems that are listening to the standard SMTP port. Not itself and end user solution, some other service that sendmail delivers messages to must be used to store and access email (e.g. POP or IMAP server). Typically end user then use a popular email client (e.g. Thunderbird, Seamonkey, Microsoft Outlook, ...) to access there mail fromt the server it is stored on. |
|
|
SendGrid
rickatech 2016-09
Elsewhere [edit]
# yum install sendmail # yum install mailx # yum install cyrus-sasl-plain # rpm -qa | grep -i cyrus cyrus-sasl-2.1.26-20.el7_2.x86_64 cyrus-sasl-plain-2.1.26-20.el7_2.x86_64 cyrus-sasl-lib-2.1.26-20.el7_2.x86_64 # rcsdiff sendmail.mc 26a27 > define(`SMART_HOST', `smtp.sendgrid.net')dnl 113a115,117 > dnl # needed for sendgrid > define(`RELAY_MAILER_ARGS', `TCP $h 587')dnl > define(`ESMTP_MAILER_ARGS', `TCP $h 587')dnl # systemctl status sendmail # tail -f /var/log/messages # mailq # tail -f /var/log/maillog
The config files shown at right are from the first
mail server in a two mail server scenario. The first server has port 25
exposed to the Internet and directly hosts mail for: badleafeng.com.
The second server is internal only, but has the first server relay mail to
it for domains: zaptech.com, zaptech.org, missioncitydesign.com,
shaulsails.com, oldquad.org
Somehow this helps elucidate many of the common config tasks that sendmail setup entails even though it may be an atypical setup. Tips ...
|
# cat local-host-names # local-host-names - include all aliases for your machine here. # Rick - ONLY put domains here that resolve to mail accounts on THIS # machine. If domains are relayed THROUGH this machine, only # place directives for those domains in the access and mailertable # files. Otherwise mail for accounts WILL NOT be relayed to # other machines!!!!! Classic symptom is a 550 error for accounts # that only exist on other machines, with LOCAL accounts intercepting # any email that was supposed to be relayed that happens to match. badleafeng.com pop.badleafeng.com # cat mailertable # Without entries below, typically the external MX servers for messages # waiting to be sent with these address/domains would be looked up. With the # the entries below, external MX lookups are skipped and delivery is attempted # to the port/host specified. Typically port/host would be a host on the # local network that knows how to handle mail for these address/domains. zaptech.com esmtp:[f5ip32.local.zaptech.org] zaptech.org esmtp:[f5ip32.local.zaptech.org] missioncitydesign.com esmtp:[f5ip32.local.zaptech.org] shaulsails.com esmtp:[f5ip32.local.zaptech.org] oldquad.org esmtp:[f5ip32.local.zaptech.org] # cat virtualusertable support@badleafeng.com oakleaf marketing@badleafeng.com oakleaf sales@badleafeng.com oakleaf webmaster@badleafeng.com oakleaf oakleaf@badleafeng.com oakleaf curtis@badleafeng.com elia # cat access # Check the /usr/share/doc/sendmail/README.cf file for a description # of the format of this file. (search for access_db in that file) # The /usr/share/doc/sendmail/README.cf is part of the sendmail-doc # package. # # by default we allow relaying from localhost... localhost.localdomain RELAY localhost RELAY 127.0.0.1 RELAY zaptech.com RELAY zaptech.org RELAY shaulsails.com RELAY missioncitydesign.com RELAY oldquad.org RELAY badleafeng.com OK |
$ cat /etc/mail/mailertable jabber.zaptech.com esmtp:[jabber.zaptech.com]
Dovecot IMAP/POP server (Centos 4, installation)
# wget http://dl.atrpms.net/all/dovecot-1.0.5-15_61.el4.i386.rpm ... # yum install postgresql-libs ... # rpm -ivh dovecot-1.0.5-15_61.el4.i386.rpm ... # service dovecot ...