Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

i have a CentOS 6.4 in mediatemple.net, i need send email to Gmail, Hotmail, etc.

I tried installing postfix, sendmail, dovecot, cyrus, procmail, spamassassin, etc., and even does not work because when testing, the mail never leaves nor throws an error.

I could say as I install an SMTP server, POP3, IMAP, which can send mails to Gmail, Hotmail, Live, Yandex, Yahoo, etc..

Install:

# yum install sendmail*
# yum install cyrus*
# yum install dovecot
# yum install procmail
# yum install spamassassin

Configure Sendmail:

# nano /etc/mail/sendmail.mc

define(`confLOG_LEVEL', `20')dnl 
define(`confAUTH_OPTIONS', `A p')dnl 
TRUST_AUTH_MECH(`EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl 
define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl 
define(`confCACERT_PATH', `/etc/pki/tls/certs')dnl
define(`confCACERT', `/etc/pki/tls/certs/ca-bundle.crt')dnl
define(`confSERVER_CERT', `/etc/pki/tls/certs/sendmail.pem')dnl
define(`confSERVER_KEY', `/etc/pki/tls/certs/sendmail.pem')dnl
DAEMON_OPTIONS(`Port=smtp, Name=MTA')dnl 
DAEMON_OPTIONS(`Port=submission, Name=MSA, M=Ea')dnl 
DAEMON_OPTIONS(`Port=smtps, Name=TLSMTA, M=s')dnl 
dnl FEATURE(`accept_unresolvable_domains')dnl 
INPUT_MAIL_FILTER(`spamassassin', `S=unix:/var/run/spamassassin/spamass-milter.sock, F=, T=C:15m;S:4m;R:4m;E:10m')dnl 
define(`confMILTER_MACROS_CONNECT',`t, b, j, _, {daemon_name}, {if_name}, {if_addr}')dnl 
define(`confMILTER_MACROS_HELO',`s, {tls_version}, {cipher}, {cipher_bits}, {cert_subject}, {cert_issuer}')dnl

# nano /etc/mail/local-host-names
*

Configure Devcot:

# nano /etc/dovecot.conf

protocols = imap imaps pop3 pop3s 
ssl_cert_file = /etc/pki/tls/certs/sendmail.pem 
ssl_key_file = /etc/pki/tls/certs/sendmail.pem 
ssl_ca_file = /etc/pki/tls/certs/sendmail.pem 
verbose_ssl = yes


# chkconfig dovecot on

Configure SpamAssassin:

# cd /etc/mail/spamassassin
# mv local.cf local.cf.orig
# nano local.cf

required_score          5.0 
rewrite_header subject  [SPAM] 
report_safe             1 
use_bayes               1 
use_bayes_rules         1 
bayes_auto_learn        1 
skip_rbl_checks         0

# chkconfig spamassassin on
# cd /usr/src
# wget http://www.voztovoice.org/tmp/spamass-milter-0.3.1.tar.gz
# tar -xf spamass-milter-0.3.1.tar.gz
# cd spamass-milter-0.3.1
# yum install gcc ncurses ncurses-devel make gcc-c++ libtermcap libtermcap-devel zlib zlib-devel libtool
# ./configure
# make
# make install
# cd contrib
# nano spamass-milter-redhat.rc

SM_SOCKET=/var/run/spamassassin/spamass-milter.sock 
[ -x /usr/local/sbin/spamass-milter ] || exit 0 
PATH=$PATH:/usr/local/sbin

# cp spamass-milter-redhat.rc /etc/init.d/spamass-milter
# cd /etc/init.d
# chmod +x spamass-milter
# chkconfig --level 2345 spamass-milter on
# nano /etc/sysconfig/spamass-milter

SOCKET=/var/run/spamassassin/spamass-milter.sock 
EXTRA_FLAGS="-r 15"

# reboot

Logs and tests

# nano /var/log/maillog
# yum install telnet
# telnet

telnet> o localhost 25 
Trying 127.0.0.1... 
Connected to localhost.localdomain (127.0.0.1). 
Escape character is '^]'. 
220 ejemplo.org ESMTP Sendmail 8.13.8/8.13.8; Tue, 13 Oct 2009 15:20:59 GMT 
ehlo root.com 
250-example.org Hello localhost [127.0.0.1], pleased to meet you 
250-ENHANCEDSTATUSCODES 
250-PIPELINING 
250-8BITMIME 
250-SIZE 
250-DSN 
250-ETRN 
250-AUTH GSSAPI DIGEST-MD5 CRAM-MD5 
250-STARTTLS 
250-DELIVERBY 
250 HELP


quit


# spamassassin -t < /usr/share/doc/spamassassin-3.3.1/sample-nonspam.txt | grep X-Spam


X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on ejemplo.org 
X-Spam-Level: 
X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=no version=3.2.5


spamassassin -t < /usr/share/doc/spamassassin-3.3.1/sample-spam.txt | grep X-Spam


X-Spam-Flag: YES 
X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on astercurso.com 
X-Spam-Level: ************************************************** 
X-Spam-Status: Yes, score=1000.0 required=5.0 tests=GTUBE,NO_RECEIVED,
share|improve this question

closed as unclear what you're asking by Kevin Panko, Moses, Garrett, Excellll, Fazer87 Jul 17 at 14:46

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question.If this question can be reworded to fit the rules in the help center, please edit the question.

1  
Your question is not clear describe the problem in more detail –  Ramhound Sep 3 '13 at 21:07

1 Answer 1

Does not work is not the best way to describe a problem, dovecot receives emails, while sendmail/postfix send emails, so you just need to install one of them, sendmail is the easier if you ask me. And if you're sending from a form chances are the problem is in your code.

If all you want is to create a contact form, then use foxyform.com. If installing a mail server is hard for you then consider using Iredmail, which is a package that contains everything.

To install sendmail just

yum install sendmail

And that should do it, the problems is more likely to be in your code, please give more details

share|improve this answer
    
does not work because when testing, the mail never leaves nor throws an error. –  Olaf Erlandsen Sep 3 '13 at 20:11
1  
@OlafErlandsen Are you sending from a form? if so please provide a code? and right now what are mail server are you using? did you uninstall the other mail servers you tried to install? –  Fischer Sep 3 '13 at 20:15
    
no... i use cli... show my update –  Olaf Erlandsen Sep 3 '13 at 20:33
    
@OlafErlandsen why the hell you need cyrus dovecot, sendmail, procmail and cyrus all together! you know what they are? look just uninstall everything, if you could format the server it's better and just install iredmail, follow this tutorial on rackspace rackspace.com/knowledge_center/article/… if you face any problem, read the comments first –  Fischer Sep 3 '13 at 21:06

Not the answer you're looking for? Browse other questions tagged or ask your own question.