Mail sending problem

Discussion in 'Server Operation' started by fridge, Jul 13, 2007.

  1. fridge

    fridge New Member

    Hello there. I have followed the 'Perfect Setup' for Ubuntu 7.04 and am facing some difficulties when sending mail from another server (I tried to send from gmail) to my local linux server. I can send mail from my server without any problems with the 'mail' command. Any suggestions?

    I am not using ISPConfig by the way.

    Some information that might be useful:
    Code:
    chaim@webfridge:~$ postconf -n
    
    alias_database = hash:/etc/aliases
    alias_maps = hash:/etc/aliases
    append_dot_mydomain = no
    biff = no
    broken_sasl_auth_clients = yes
    config_directory = /etc/postfix
    home_mailbox = Maildir/
    inet_interfaces = all
    inet_protocols = all
    mailbox_command =
    mailbox_size_limit = 0
    mydestination = webfridge.peppermint-design.com, localhost.peppermint-design.com, localhost.localdomain.com, localhost
    myhostname = webfridge.peppermint-design.com
    mynetworks = 127.0.0.0/8
    myorigin = /etc/mailname
    recipient_delimiter = +
    relayhost =
    smtp_tls_note_starttls_offer = yes
    smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
    smtp_use_tls = yes
    smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
    smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_local_domain =
    smtpd_sasl_security_options = noanonymous
    smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
    smtpd_tls_auth_only = no
    smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
    smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
    smtpd_tls_loglevel = 1
    smtpd_tls_received_header = yes
    smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
    smtpd_tls_session_cache_timeout = 3600s
    smtpd_use_tls = yes
    tls_random_source = dev:/dev/urandom
    I have yet to receive a "couldn't be delivered" error e-mail. God only knows wether or not I will receive one eventually...

    Thanks in advance,
    ~ Fridge
     
  2. falko

    falko Super Moderator Howtoforge Staff

  3. fridge

    fridge New Member

    I didn't do that but I did it just now. I am having the same problem as the person in thread
    http://www.howtoforge.com/forums/showthread.php?t=13395
    though, when I run
    Code:
    postconf -e 'virtual_maps = hash:/etc/postfix/virtusertable'
    /etc/init.d/postfix restart
    that line doesn't show up in "postconf -n"...

    Here's my current postconf -n:
    Code:
    alias_database = hash:/etc/aliases
    alias_maps = hash:/etc/aliases
    append_dot_mydomain = no
    biff = no
    broken_sasl_auth_clients = yes
    config_directory = /etc/postfix
    home_mailbox = Maildir/
    inet_interfaces = all
    inet_protocols = all
    mailbox_command =
    mailbox_size_limit = 0
    mydestination = /etc/postfix/local-host-names
    myhostname = webfridge.peppermint-design.com
    mynetworks = 127.0.0.0/8
    myorigin = /etc/mailname
    recipient_delimiter = +
    relayhost =
    smtp_tls_note_starttls_offer = yes
    smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
    smtp_use_tls = yes
    smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
    smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_local_domain =
    smtpd_sasl_security_options = noanonymous
    smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
    smtpd_tls_auth_only = no
    smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
    smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
    smtpd_tls_loglevel = 1
    smtpd_tls_received_header = yes
    smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
    smtpd_tls_session_cache_timeout = 3600s
    smtpd_use_tls = yes
    tls_random_source = dev:/dev/urandom
    When manually editing main.cf the line is actually already there.

    My output for
    Code:
    updatedb
    locate main.cf
    would be
    Code:
    /etc/postfix/main.cf
    /usr/share/postfix/main.cf.debian
    /usr/share/postfix/main.cf.dist
    /usr/share/postfix/main.cf.tls
    Nope no errors in my /var/postfix/mail.err, mail.info, mail.warn or mail.log files.

    Thanks for your help by the way, I hope we can get to the bottom of this. I'm quite inexperienced when it comes to linux, so even though this is quite annoying, it's a good way to understand more of my system.

    Oh and by the way in the meanwhile I've received an errormail containing a delivery failure notification:
    Code:
    This is an automatically generated Delivery Status Notification
    
    THIS IS A WARNING MESSAGE ONLY.
    
    YOU DO NOT NEED TO RESEND YOUR MESSAGE.
    
    Message will be retried for 2 more day(s)
    Technical details of temporary failure:
    TEMP_FAILURE: Could not initiate SMTP conversation with any hosts:
    [webfridge.peppermint-design.com (1): Connection timed out]
     
    Last edited: Jul 14, 2007
  4. falko

    falko Super Moderator Howtoforge Staff

    I can't connect to port 25 (SMTP) on webfridge.peppermint-design.com 25:

    Code:
    mh1:~# telnet webfridge.peppermint-design.com 25
    Trying 84.104.147.194...
    
    mh1:~#
    Is webfridge.peppermint-design.com your server? What's the output of
    Code:
    netstat -tap
    ? Please make sure that no firewall is blocking port 25.
     
  5. fridge

    fridge New Member

    Sorry, my server was down at the moment you tried to connect to it. It should work now, I'm pretty sure my firewall isn't blocking that port. Please try again.

    Here's the output of netstat -tap:
    Code:
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
    tcp        0      0 *:mysql                 *:*                     LISTEN     3863/mysqld
    tcp        0      0 *:www                   *:*                     LISTEN     4235/apache2
    tcp        0      0 *:ftp                   *:*                     LISTEN     4189/proftpd: (acce
    tcp        0      0 webfridge.pepper:domain *:*                     LISTEN     3751/named
    tcp        0      0 localhost.locald:domain *:*                     LISTEN     3751/named
    tcp        0      0 *:smtp                  *:*                     LISTEN     4086/master
    tcp        0      0 localhost.localdoma:953 *:*                     LISTEN     3751/named
    tcp        0      0 *:https                 *:*                     LISTEN     4235/apache2
    tcp6       0      0 *:imaps                 *:*                     LISTEN     3978/couriertcpd
    tcp6       0      0 *:pop3s                 *:*                     LISTEN     4019/couriertcpd
    tcp6       0      0 *:pop3                  *:*                     LISTEN     3997/couriertcpd
    tcp6       0      0 *:imap2                 *:*                     LISTEN     3956/couriertcpd
    tcp6       0      0 *:domain                *:*                     LISTEN     3751/named
    tcp6       0      0 *:ssh                   *:*                     LISTEN     4122/sshd
    tcp6       0      0 *:smtp                  *:*                     LISTEN     4086/master
    tcp6       0      0 ip6-localhost:953       *:*                     LISTEN     3751/named
    tcp6       0    740 webfridge.peppermin:ssh ::ffff:192.168.0.1:3157 ESTABLISHED4263/0
     
  6. falko

    falko Super Moderator Howtoforge Staff

    It's down again... Maybe that is part of the problem that your server isn't always online...
     
  7. fridge

    fridge New Member

    It seems that it was up when you tried it, could you give it another shot? I can telnet to it on port 25 without any problem. I've checked and the port is forwarded correctly.

    The box is right next to me and I am 100% sure it was online when I tried to mail to it so yes I'm sure that is not the problem.
     
  8. falko

    falko Super Moderator Howtoforge Staff

    Down again... If you are sure that your server is online, then it's most probably a firewall problem. Or your ISP is blocking port 25.
     
  9. fridge

    fridge New Member

    Right, thanks a lot for your patience, time and help, I will try and figure out what is blocking that port.

    Cheers,
    ~Fridge
     

Share This Page