View Full Version : Postfix & Spamassassin Port Change
nightsbird
31st August 2006, 07:37
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=<jgdunbar@charter.net>, 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
till
1st September 2006, 11:21
If you use the perfect setup together with ISPConfig, you dont have to change anything in the spamassassin configuration.
nightsbird
1st September 2006, 16:06
i keep getting a timout error when it tries to send mail what would cause this then
falko
1st September 2006, 17:15
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?
nightsbird
2nd September 2006, 01:15
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=<web2_jgdunbar@example.com>, 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=<jgdunbar@charter.net>, 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=<web1_jeff@example.com>, 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=<jgdunbar@charter.net>, 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=<web1_jeff@example.com>, size=680, nrcpt=1 (queue active)
Sep 1 16:55:48 serv1 postfix/qmgr[4795]: B4A9C12051D: from=<web1_jeff@example.com>, 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=<jgdunbar@charter.net>, 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=<jgdunbar@charter.net>, relay=none, delay=63845, status=deferred (connect to mail.charter.net[209.225.8.224]: read timeout)
till
2nd September 2006, 11:28
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.
nightsbird
2nd September 2006, 17:53
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
falko
4th September 2006, 00:05
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?
nightsbird
4th September 2006, 07:30
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_authenticate d,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
nightsbird
4th September 2006, 08:46
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 jeff@xg3d.com) and cannot send mail at all same user and password does not work
This is the Postfix program at host server1.xg3d.com.
I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.
For further assistance, please send mail to <postmaster>
If you do so, please include this problem report. You can
delete your own text from the attached returned message.
The Postfix program
<jgdunbar@charter.net>: Host or domain name not found. Name service error for
name=charter.net type=AAAA: Host found but no data record of requested type
this error is sys log
Sep 4 00:41:20 serv1 courierpop3login: Connection, ip=[::ffff:24.178.15.158]
Sep 4 00:41:20 serv1 courierpop3login: LOGIN, user=web1_jeff, ip=[::ffff:24.178.15.158]
Sep 4 00:41:20 serv1 courierpop3login: LOGOUT, user=web1_jeff, ip=[::ffff:24.178.15.158], top=0, retr=0, time=0
Sep 4 00:44:40 serv1 postfix/anvil[5768]: statistics: max connection rate 1/60s for (265:24.178.15.158) at Sep 4 00:41:20
Sep 4 00:44:40 serv1 postfix/anvil[5768]: statistics: max connection count 1 for (265:24.178.15.158) at Sep 4 00:41:20
Sep 4 00:44:40 serv1 postfix/anvil[5768]: statistics: max cache size 1 at Sep 4 00:41:20
Sep 4 00:45:13 serv1 postfix/smtpd[5819]: connect from unknown[24.178.15.158]
Sep 4 00:45:13 serv1 postfix/smtpd[5819]: NOQUEUE: reject: RCPT from unknown[24.178.15.158]: 554 <jgdunbar@charter.net>: Relay access denied; from=<jeff@xg3d.com> to=<jgdunbar@charter.net> proto=SMTP helo=<xg1>
Sep 4 00:45:13 serv1 postfix/smtpd[5819]: disconnect from unknown[24.178.15.158]
Sep 4 00:46:47 serv1 postfix/smtpd[5819]: connect from unknown[24.178.15.158]
Sep 4 00:46:49 serv1 postfix/smtpd[5819]: lost connection after AUTH from unknown[24.178.15.158]
Sep 4 00:46:49 serv1 postfix/smtpd[5819]: disconnect from unknown[24.178.15.158]
falko
5th September 2006, 19:23
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).
Seems as if your server has a problem with name resolution. What's in /etc/resolv.conf?
Also i cannot login in outlook express without web1_jeff (email is jeff@xg3d.com) and cannot send mail at all same user and password does not work
You must use the user name (e.g. web1_jeff) in Outlook Express, not the email address or anything else.
nightsbird
5th September 2006, 19:44
resolv has
127.0.0.1
and my 2 ISP name servers
falko
6th September 2006, 20:00
Change it to
nameserver 145.253.2.75
nameserver 193.174.32.18
nameserver 194.25.0.60
and try again.
nightsbird
6th September 2006, 20:19
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=<2928.192.168.200.2.1157562897.squirrel@www.xg3d.co m>
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=<jeff@xg3d.com>, 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=<jeff.dunbar@encore-etch.com>, 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=<20060906171457.DC371120560@server1.xg3d.com>
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=<web1_jeff@serv1.xg3d.com>, orig_to=<jeff@xg3d.com>, 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=<20060906171458.71CDB12056B@server1.xg3d.com>
Sep 6 12:14:58 serv1 postfix/qmgr[11174]: 71CDB12056B: from=<web1_jeff@serv1.xg3d.com>, size=370, nrcpt=1 (queue active)
Sep 6 12:14:58 serv1 postfix/local[20954]: 71CDB12056B: to=<admispconfig@localhost.localdomain>, relay=local, delay=0, status=sent (delivered to command: /usr/bin/procmail -f-)
Sep 6 12:14:58 serv1 postfix/qmgr[11174]: 71CDB12056B: removed
nightsbird
7th September 2006, 15:14
this is the new error
3:00 serv1 postfix/qmgr[18989]: B685E1200CE: from=<jeff@xg3d.com>, size=687, nrcpt=1 (queue active)
Sep 7 07:13:00 serv1 postfix/qmgr[18989]: 681A112056E: from=<jeff@xg3d.com>, 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=<jgdunbar@charter.net>, 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=<jgdunbar@charter.net>, relay=none, delay=1452, status=deferred (connect to mail.charter.net[209.225.8.224]: Connection timed out)
nightsbird
7th September 2006, 15:16
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
falko
7th September 2006, 20:15
Tried sending from and sending to neither worked
What's the output of updatedb
locate resolv.conf? I think there could be a second resolv.conf in Postfix' chroot jail.
nightsbird
7th September 2006, 20:25
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
falko
8th September 2006, 19:51
So /var/spool/postfix/etc/resolv.conf and /etc/resolv.conf contain exactly the same?
nightsbird
8th September 2006, 20:00
yes they do
falko
9th September 2006, 15:56
I can connect fine to mail.charter.net:
telnet mail.charter.net 25
Trying 209.225.8.224...
Connected to mail.charter.net.
Escape character is '^]'.
220 charter.net ESMTP
ehlo localhost
250-charter.net
250-8BITMIME
250 SIZE 15728640
quit
221 charter.net
Connection closed by foreign host.
Is your server hosted on a dynamic IP address or blacklisted? I think that mail.charter.net is blocking you therefore. Maybe you should try relaying through another mail server: http://www.howtoforge.com/forums/showthread.php?t=72&highlight=relayhost
nightsbird
9th September 2006, 18:41
yes i have a dynamic ip but it never changes. This server is at work. The charter.net address is where it was trying to connect to send a test message not relaying through it. It must be a problem with the install or the change in postfix to an alternate port.
I built a vmware image to run from home for xg3d.net following your tutorial and it works without any problem. The only thing different between the one at work and one at home is that my home isp does not block port 25
falko
10th September 2006, 20:44
I built a vmware image to run from home for xg3d.net following your tutorial and it works without any problem. The only thing different between the one at work and one at home is that my home isp does not block port 25
So at work port 25 is blocked? Then it cannot work...
nightsbird
11th September 2006, 03:50
so then the port 25 cannot be changed somewhere to make it work
falko
12th September 2006, 16:28
Have a look here: http://www.howtoforge.com/forums/showthread.php?t=4788&highlight=postfix+port
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.