Postfix & Spamassassin Port Change

Discussion in 'Installation/Configuration' started by nightsbird, Aug 31, 2006.

  1. nightsbird

    nightsbird New Member

    I figured out how to change the port on postfix but i read that i have to change it in spamassassin also what file do i do this in? My isp blocks port 25.

    Ubuntu perfect LTS server setup is what i used .

    I kept getting this error

    Aug 30 21:34:07 serv1 postfix/smtp[6212]: connect to mail.charter.net[209.225.8.224]: Connection timed out (port 25)
    Aug 30 21:34:07 serv1 postfix/smtp[6212]: 514AA1204AA: to=<[email protected]>, relay=none, delay=91909, status=deferred (connect to mail.charter.net[209.225.8.224]: Connection timed out)

    actually i cannot send or recieve so i guess i messed it up somewhere
     
    Last edited: Aug 31, 2006
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    If you use the perfect setup together with ISPConfig, you dont have to change anything in the spamassassin configuration.
     
  3. nightsbird

    nightsbird New Member

    i keep getting a timout error when it tries to send mail what would cause this then
     
  4. falko

    falko Super Moderator Howtoforge Staff

    You don't need to change anything for SpamAssassin as it is called by procmail recipes, so it doesn't matter on which port you run Postfix. And SpamAssassin isn't called when you send mails, only when you receive mails. So your problem must be something else.

    What's in your mail log?
     
  5. nightsbird

    nightsbird New Member

    this just repeats over and over and why does it say web1/web2 @example.com



    Sep 1 16:05:48 serv1 postfix/qmgr[4795]: 514AA1204AA: from=<[email protected]>, size=686, nrcpt=1 (queue active)
    Sep 1 16:10:48 serv1 postfix/smtp[17959]: connect to mail.charter.net[209.225.8.224]: read timeout (port 265)
    Sep 1 16:10:48 serv1 postfix/smtp[17959]: 514AA1204AA: to=<[email protected]>, relay=none, delay=245310, status=deferred (connect to mail.charter.net[209.225.8.224]: read timeout)
    Sep 1 16:22:28 serv1 postfix/qmgr[4795]: 190AE1200D7: from=<[email protected]>, size=688, nrcpt=1 (queue active)
    Sep 1 16:22:59 serv1 postfix/smtp[18173]: connect to mail.charter.net[209.225.8.224]: Connection timed out (port 265)
    Sep 1 16:22:59 serv1 postfix/smtp[18173]: 190AE1200D7: to=<[email protected]>, relay=none, delay=59798, status=deferred (connect to mail.charter.net[209.225.8.224]: Connection timed out)
    Sep 1 16:55:48 serv1 postfix/qmgr[4795]: A7EC41203C8: from=<[email protected]>, size=680, nrcpt=1 (queue active)
    Sep 1 16:55:48 serv1 postfix/qmgr[4795]: B4A9C12051D: from=<[email protected]>, size=684, nrcpt=1 (queue active)
    Sep 1 17:00:48 serv1 postfix/smtp[18592]: connect to mail.charter.net[209.225.8.224]: read timeout (port 265)
    Sep 1 17:00:48 serv1 postfix/smtp[18593]: connect to mail.charter.net[209.225.8.224]: read timeout (port 265)
    Sep 1 17:00:48 serv1 postfix/smtp[18593]: B4A9C12051D: to=<[email protected]>, relay=none, delay=62631, status=deferred (connect to mail.charter.net[209.225.8.224]: read timeout)
    Sep 1 17:00:48 serv1 postfix/smtp[18592]: A7EC41203C8: to=<[email protected]>, relay=none, delay=63845, status=deferred (connect to mail.charter.net[209.225.8.224]: read timeout)
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Is mail.charter.net your server? Then run on this server:

    netstat -tap

    and post the result here. Is your server in a NAT enviroment, then make sure that you forwarded port 25 from your router to your server and that your provider does not block port 25.
     
  7. nightsbird

    nightsbird New Member

    nope that is the server my smtp server is trying to connect to but everytime it just times out . my isp does block port 25 thats why i want to change the port ... i changed it in the master.cf to 265 on this lines

    265 inet n - n - - smtpd


    here is the netstat -tap output

    tcp 0 0 *:smtp *:* LISTEN 1110/master
    tcp 0 0 *:mysql *:* LISTEN 3756/mysqld
    tcp 0 0 *:81 *:* LISTEN 4090/ispconfig_http
    tcp 0 0 *:ftp *:* LISTEN 25419/proftpd: (acc
    tcp 0 0 serv1.xg3d.com:domain *:* LISTEN 22109/named
    tcp 0 0 localhost.locald:domain *:* LISTEN 22109/named
    tcp 0 0 localhost.localdoma:953 *:* LISTEN 22109/named
    tcp 0 0 serv1.xg3d.com:44887 mail.charter.net:smtp ESTABLISHED1115/smtp
    tcp 0 0 serv1.xg3d.com:44890 mail.charter.net:smtp ESTABLISHED1120/smtp
    tcp 0 0 serv1.xg3d.com:44889 mail.charter.net:smtp ESTABLISHED1119/smtp
    tcp 0 0 serv1.xg3d.com:44888 mail.charter.net:smtp ESTABLISHED1121/smtp
    tcp6 0 0 *:imaps *:* LISTEN 3630/couriertcpd
    tcp6 0 0 *:pop3s *:* LISTEN 3665/couriertcpd
    tcp6 0 0 *:smtp *:* LISTEN 1110/master
    tcp6 0 0 *:pop3 *:* LISTEN 3645/couriertcpd
    tcp6 0 0 *:imap2 *:* LISTEN 3610/couriertcpd
    tcp6 0 0 *:www *:* LISTEN 4193/apache2
    tcp6 0 0 *:ssh *:* LISTEN 3928/sshd
    tcp6 0 0 ip6-localhost:953 *:* LISTEN 22109/named
    tcp6 0 0 *:https *:* LISTEN 4193/apache2
    tcp6 0 1284 serv1.xg3d.com:ssh 24-178-15-158.dhcp:3279 ESTABLISHED779/0
    tcp6 0 0 serv1.xg3d.com:ssh 24-178-15-158.dhcp:3278 ESTABLISHED774/sshd: root@nott
    tcp6 0 0 serv1.xg3d.com:ssh 24-178-15-158.dhcp:3285 ESTABLISHED810/sshd: root@nott

    i can telnet to my server over port 265 and get a response like the one listed in the tutorial
     
    Last edited: Sep 2, 2006
  8. falko

    falko Super Moderator Howtoforge Staff

    I don't see anything running on port 265 in your netstat output. Also, are you sure your ISP isn't blocking port 265?
    What's in /etc/postfix/master.cf? Did you restart Postfix?
     
  9. nightsbird

    nightsbird New Member

    I know it works i can telnet into the server over that port from a remote computer... i changed it in the /etc/services file

    this is the master.cf

    #
    # Postfix master process configuration file. For details on the format
    # of the file, see the Postfix master(5) manual page.
    #
    # ==========================================================================
    # service type private unpriv chroot wakeup maxproc command + args
    # (yes) (yes) (yes) (never) (100)
    # ==========================================================================
    smtp inet n - n - - smtpd
    #submission inet n - - - - smtpd
    # -o smtpd_etrn_restrictions=reject
    # -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    #smtps inet n - - - - smtpd
    # -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
    #submission inet n - - - - smtpd
    # -o smtpd_etrn_restrictions=reject
    # -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes
    #628 inet n - - - - qmqpd
    pickup fifo n - - 60 1 pickup
    cleanup unix n - - - 0 cleanup
    qmgr fifo n - n 300 1 qmgr
    #qmgr fifo n - - 300 1 oqmgr
    tlsmgr unix - - - 1000? 1 tlsmgr
    rewrite unix - - - - - trivial-rewrite
    bounce unix - - - - 0 bounce
    defer unix - - - - 0 bounce
    trace unix - - - - 0 bounce
    verify unix - - - - 1 verify
    flush unix n - - 1000? 0 flush
    proxymap unix - - n - - proxymap
    smtp unix - - - - - smtp
    # When relaying mail as backup MX, disable fallback_relay to avoid MX loops
    relay unix - - - - - smtp
    -o fallback_relay=
    # -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
    showq unix n - - - - showq
    error unix - - - - - error
    discard unix - - - - - discard
    local unix - n n - - local
    virtual unix - n n - - virtual
    lmtp unix - - - - - lmtp
    anvil unix - - - - 1 anvil
    scache unix - - - - 1 scache
    #
    # ====================================================================
    # Interfaces to non-Postfix software. Be sure to examine the manual
    # pages of the non-Postfix software to find out what options it wants.
    #
    # Many of the following services use the Postfix pipe(8) delivery
    # agent. See the pipe(8) man page for information about ${recipient}
    # and other message envelope options.
    # ====================================================================
    #
    # maildrop. See the Postfix MAILDROP_README file for details.
    # Also specify in main.cf: maildrop_destination_recipient_limit=1
    #
    maildrop unix - n n - - pipe
    flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
    #
    # See the Postfix UUCP_README file for configuration details.
    #
    uucp unix - n n - - pipe
    flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
    #
    # Other external delivery methods.
    #
    ifmail unix - n n - - pipe
    flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
    bsmtp unix - n n - - pipe
    flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
    scalemail-backend unix - n n - 2 pipe
    flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
    mailman unix - n n - - pipe
    flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
    ${nexthop} ${user}

    if you try it in dnsreport.com's mail test it fails saying there is no mx record but there is an mx listed in the bind9 pri.xg3d.com file if you try there service on xg3d.net which is hosted on same server as a seperate account it gets the mx record but not mail is sent or recieved from it as well
     
  10. nightsbird

    nightsbird New Member

    okay got i have no clue what i did but i can send/recieve mail locally but not to external mail address' i get this error(below). Also i cannot login in outlook express without web1_jeff (email is [email protected]) and cannot send mail at all same user and password does not work

    this error is sys log
     
    Last edited: Sep 4, 2006
  11. falko

    falko Super Moderator Howtoforge Staff

    Seems as if your server has a problem with name resolution. What's in /etc/resolv.conf?

    You must use the user name (e.g. web1_jeff) in Outlook Express, not the email address or anything else.
     
  12. nightsbird

    nightsbird New Member

    resolv has
    127.0.0.1
    and my 2 ISP name servers
     
  13. falko

    falko Super Moderator Howtoforge Staff

    Change it to

    Code:
    nameserver 145.253.2.75
    nameserver 193.174.32.18
    nameserver 194.25.0.60
    and try again.
     
  14. nightsbird

    nightsbird New Member

    Tried sending from and sending to neither worked

    this is log



    Sep 6 12:14:57 serv1 postfix/smtpd[20943]: connect from localhost.localdomain[127.0.0.1]
    Sep 6 12:14:57 serv1 postfix/smtpd[20943]: 3EDC8120567: client=localhost.localdomain[127.0.0.1]
    Sep 6 12:14:57 serv1 postfix/cleanup[20947]: 3EDC8120567: message-id=<[email protected]>
    Sep 6 12:14:57 serv1 postfix/smtpd[20943]: disconnect from localhost.localdomain[127.0.0.1]
    Sep 6 12:14:57 serv1 postfix/qmgr[11174]: 3EDC8120567: from=<[email protected]>, size=701, nrcpt=1 (queue active)
    Sep 6 12:14:57 serv1 imaplogin: Connection, ip=[::ffff:127.0.0.1]
    Sep 6 12:14:57 serv1 imaplogin: LOGIN, user=web1_jeff, ip=[::ffff:127.0.0.1], protocol=IMAP
    Sep 6 12:14:57 serv1 imaplogin: LOGOUT, user=web1_jeff, ip=[::ffff:127.0.0.1], headers=0, body=0, time=0
    Sep 6 12:14:57 serv1 postfix/smtp[20949]: 3EDC8120567: to=<[email protected]>, relay=none, delay=0, status=bounced (Host or domain name not found. Name service error for name=encore-etch.com type=AAAA: Host found but no data record of requested type)
    Sep 6 12:14:57 serv1 postfix/cleanup[20947]: DC371120560: message-id=<[email protected]>
    Sep 6 12:14:57 serv1 postfix/qmgr[11174]: DC371120560: from=<>, size=2652, nrcpt=1 (queue active)
    Sep 6 12:14:57 serv1 postfix/qmgr[11174]: 3EDC8120567: removed
    Sep 6 12:14:58 serv1 imaplogin: Connection, ip=[::ffff:127.0.0.1]
    Sep 6 12:14:58 serv1 imaplogin: LOGIN, user=web1_jeff, ip=[::ffff:127.0.0.1], protocol=IMAP
    Sep 6 12:14:58 serv1 imaplogin: LOGOUT, user=web1_jeff, ip=[::ffff:127.0.0.1], headers=0, body=0, time=1
    Sep 6 12:14:58 serv1 postfix/local[20954]: DC371120560: to=<[email protected]>, orig_to=<[email protected]>, relay=local, delay=1, status=sent (delivered to command: /usr/bin/procmail -f-)
    Sep 6 12:14:58 serv1 postfix/qmgr[11174]: DC371120560: removed
    Sep 6 12:14:58 serv1 postfix/pickup[20420]: 71CDB12056B: uid=10009 from=<web1_jeff>
    Sep 6 12:14:58 serv1 postfix/cleanup[20947]: 71CDB12056B: message-id=<[email protected]>
    Sep 6 12:14:58 serv1 postfix/qmgr[11174]: 71CDB12056B: from=<[email protected]>, size=370, nrcpt=1 (queue active)
    Sep 6 12:14:58 serv1 postfix/local[20954]: 71CDB12056B: to=<[email protected]>, relay=local, delay=0, status=sent (delivered to command: /usr/bin/procmail -f-)
    Sep 6 12:14:58 serv1 postfix/qmgr[11174]: 71CDB12056B: removed
     
  15. nightsbird

    nightsbird New Member

    this is the new error

    3:00 serv1 postfix/qmgr[18989]: B685E1200CE: from=<[email protected]>, size=687, nrcpt=1 (queue active)
    Sep 7 07:13:00 serv1 postfix/qmgr[18989]: 681A112056E: from=<[email protected]>, size=1378, nrcpt=1 (queue active)
    Sep 7 07:13:31 serv1 postfix/smtp[18993]: connect to mail.charter.net[209.225.8.224]: Connection timed out (port 26)
    Sep 7 07:13:31 serv1 postfix/smtp[18995]: connect to mail.charter.net[209.225.8.224]: Connection timed out (port 26)
    Sep 7 07:13:31 serv1 postfix/smtp[18995]: 681A112056E: to=<[email protected]>, relay=none, delay=829, status=deferred (connect to mail.charter.net[209.225.8.224]: Connection timed out)
    Sep 7 07:13:31 serv1 postfix/smtp[18993]: B685E1200CE: to=<[email protected]>, relay=none, delay=1452, status=deferred (connect to mail.charter.net[209.225.8.224]: Connection timed out)
     
  16. nightsbird

    nightsbird New Member

    it appears that everytime i change the postfix smtp port it now tries to send mail to the same port on remote servers instead of a blanket send that covers all ports. is there a fix for this
     
  17. falko

    falko Super Moderator Howtoforge Staff

    What's the output of
    Code:
    updatedb
    locate resolv.conf
    ? I think there could be a second resolv.conf in Postfix' chroot jail.
     
  18. nightsbird

    nightsbird New Member

    locate resolv.croot@serv1:~# locate resolv.conf
    /etc/resolv.conf
    /etc/resolv.conf.bak
    /usr/share/man/man5/resolv.conf.5.gz
    /var/spool/postfix/etc/resolv.conf
    root@serv1:~#

    from what i see all the files in /var/spool/postfix/etc match the ones in
    their repsective places

    in this directory is
    hosts
    localtime
    nsswitch.conf
    resolv.conf
    services
     
    Last edited: Sep 7, 2006
  19. falko

    falko Super Moderator Howtoforge Staff

    So /var/spool/postfix/etc/resolv.conf and /etc/resolv.conf contain exactly the same?
     
  20. nightsbird

    nightsbird New Member

    yes they do
     

Share This Page