Sending email from postfix doesn't work.

Discussion in 'Server Operation' started by mendoza, Sep 4, 2007.

  1. mendoza

    mendoza New Member

    Hi everybody,

    When i send email (postfix) it doesn't get to recipient email box.

    I'm able to receive email to user but replying gives error.

    I did rely authorization to my ISP mail server (rcn) and this is log from my syslog after i send the mail.

    Will i have to contact my ISP?

    I use debian4.0. postfix 2.1.5.

    From Syslog:

    Sep 2 21:46:26 debian1 postfix/smtp[8813]: 3D4125BD09: to=<[email protected]>, relay=smtp.rcn.com[207.172.4.99], delay=1, status=sent (250 ok: Message 461394833 accepted)

    thanks for any info
     
  2. falko

    falko Super Moderator ISPConfig Developer

    The mail was sent successfully. I guess that Yahoo classifies it as spam for some reason. Please check if your server got blacklisted: http://www.mxtoolbox.com/blacklists.aspx

    Also, do you have an SPF record for your domain?
     
  3. mendoza

    mendoza New Member

    still problems with emails

    So i created spf record, i'm not sure if it is correct (i included rcn.com becouse my postfix is set up to rely email via their smtp).
    Syntax is: rachot.info. IN TXT "v=spf1 a mx a:debian1.rachot.info include:rcn.com ~all"

    I also included subdomain 'debian1.xx.info' but i think i don't have to.
    Result: i'm still do not receive emails sent to yahoo or gmail account but i have webmail at rcn and i got email over there.

    Am i doing it right? In one Howto Falko states that:

    "This short guide shows how you can set up Postfix to relay emails through another mailserver. This can be useful if you run a Postfix mailserver in your local network and have a dynamic IP address because most dynamic IP addresses are blacklisted today. By relaying your emails through another mailserver that is hosted on a static IP address in a data center (e.g. your ISP's mailserver) you can prevent your emails from being categorized as spam."
    (http://howtoforge.org/postfix_relaying_through_another_mailserver)

    My ip address is dynamic and it is blacklisted about 10 times on mxtoolbox/blacklist web site. but mostly it is not blacklisted.

    I think i understand something wrong with relaying or it is not possible to get email working with yahoo or gmail with this setup? (dynamic ip)
     
  4. falko

    falko Super Moderator ISPConfig Developer

    It seems your domain doesn't exist in DNS:

    Code:
    mh1:~# dig mx rachot.info
    
    ; <<>> DiG 9.2.1 <<>> mx rachot.info
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 1695
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
    
    ;; QUESTION SECTION:
    ;rachot.info.                   IN      MX
    
    ;; Query time: 5075 msec
    ;; SERVER: 213.191.92.84#53(213.191.92.84)
    ;; WHEN: Thu Sep 13 18:00:22 2007
    ;; MSG SIZE  rcvd: 29
    
    mh1:~# dig rachot.info
    
    ; <<>> DiG 9.2.1 <<>> rachot.info
    ;; global options:  printcmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 64313
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
    
    ;; QUESTION SECTION:
    ;rachot.info.                   IN      A
    
    ;; Query time: 5027 msec
    ;; SERVER: 213.191.92.84#53(213.191.92.84)
    ;; WHEN: Thu Sep 13 18:00:33 2007
    ;; MSG SIZE  rcvd: 29
    
    mh1:~#
     
  5. mendoza

    mendoza New Member

    fixed

    My dns setting go bad (unable to connect via domain name and unable to ping from local machine) since i put SPF line into it:

    rachot.info. IN TXT "v=spf1 a mx a:debian1.rachot.info include:rcn.com ~all"

    so i gues it is wrong. when i comment it (;;) and reboot the bind everything is ok as of this moment (able to dig, dig mx rachot.info etc..). domain and subdomains works. (www.rachot.info, ruby.rachot.info; my isp sometimes blocks port 80 so i change it to 8000 but now port 80 works)



    Moreover i changed MX line from debian1.rachot.info to "mx 10 rachot.info"
    i'll look at it in more details what it means.

    my primary dns settings:

    debian1:/var/lib/named/etc/bind# cat pri.rachot.info
    $TTL 86400;

    @ IN SOA debian1.rachot.info. marblabla.yahoo.com (
    2007091107 ; serial, todays date + todays serial #
    8H ; refresh, seconds
    2H ; retry, seconds
    4W ; expire, seconds
    1D ) ; minimum, seconds
    ;


    ;; rachot.info. IN TXT "v=spf1 a mx a:debian1.rachot.info include:rcn.com ~all"



    IN NS debian1.rachot.info. ; Inet Address of name server
    IN NS ns1.xname.org.
    ;

    MX 10 rachot.info. ; Primary Mail Exchanger
    ;

    rachot.info. A 207.38.224.49
    www A 207.38.224.49
    debian1 A 207.38.224.49
    ;;debian2 A 70.107.230.201
    ftp CNAME www
    *.rachot.info. A 207.38.224.49



    when i have more time i'll redo SPF line but if you see anything obvious wrong please let me know.
    thanks!


    UPDATE: i sent email to yahoo and gmail account and it is there! so it works as supposed without spf record? or i guess changing mx line in my primary dns settings to domain (instead of subdomain fixed the problem)
     
    Last edited: Sep 14, 2007

Share This Page