Postfix problem

Hello everyone,

I am setting up a mail server using the Postfix instructions here:

http://library.linode.com/email/postfix … -6-squeeze">http://library.linode.com/email/postfix/dovecot-mysql-debian-6-squeeze

Everything went okay, right up to the point where I had to test Postfix for SMTP-AUTH and TLS.

I typed in the telnet localhost 25 command and came up with connection refused. It even said the same when I used my remote host ip address.

I have read through some of the forum posts here and via google.

I am not sure if my IP is blocking port 25.

When I do a netstat scan, it shows that nothing is listening to port 25, it isn't even in the list.

Active Internet connections (servers and established)

Proto Recv-Q Send-Q Local Address Foreign Address State

tcp 0 0 0.0.0.0:993 0.0.0.0:* LISTEN

tcp 0 0 0.0.0.0:995 0.0.0.0:* LISTEN

tcp 0 0 127.0.0.1:3306 0.0.0.0:* LISTEN

tcp 0 0 0.0.0.0:110 0.0.0.0:* LISTEN

tcp 0 0 0.0.0.0:143 0.0.0.0:* LISTEN

tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN

tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN

tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN

tcp 0 0 0.0.0.0:37176 0.0.0.0:* LISTEN

tcp 0 0 127.0.0.1:3306 127.0.0.1:57329 ESTABLISHED

tcp 0 0 127.0.0.1:57329 127.0.0.1:3306 ESTABLISHED

tcp 0 224 my ip 81.191.61.250:45169 ESTABLISHED

tcp6 0 0 :::80 :::* LISTEN

tcp6 0 0 :::22 :::* LISTEN

tcp6 0 0 my ip:80 180.76.5.146:56289 TIME_WAIT

I also took a look in my /var/log/mail.log:

Oct 12 03:10:38 (none) postfix/master[14735]: terminating on signal 15

Oct 12 03:10:39 (none) postfix/master[20178]: daemon started – version 2.7.1, configuration /etc/postfix

Oct 12 03:31:20 (none) dovecot: Killed with signal 15 (by pid=20302 uid=0 code=kill)

Oct 12 03:31:20 (none) dovecot: Dovecot v1.2.15 starting up (core dumps disabled)

Oct 12 03:31:20 (none) dovecot: auth-worker(default): mysql: Connected to 127.0.0.1 (mail)

Oct 12 03:34:58 (none) dovecot: pop3-login: Aborted login (no auth attempts): rip=127.0.0.1, lip=127.0.0.1, secured

Oct 12 03:36:07 (none) postfix/master[20178]: terminating on signal 15

Oct 12 03:36:07 (none) postfix/master[20444]: fatal: /etc/postfix/master.cf: line 111: bad transport type: user=vmail:vmail

I am not sure why there is an error in the last line concerning the master.cf, as these were the instructions given from the above help guide on Linode. I don't know if that is interfering with anything either.

I am sure there is a way to open port 25 or to do something clever or easy to fix this, but I do not know what. I would appreciate a helping hand and a push into the right direction. :)

Thanks in advance,

Jasmin

7 Replies

Ah by the way, I tried the advice from theckman to check if my IP is blocking 25 by checking another mail server that certainly works.

Have you made sure your ISP isn't blocking outbound port 25? You can test this by seeing if another mailserver is blocked on port 25. I know for a fact mail2.linode.com should accept connections on port 25. Won't allow you to send mail, but TCP handshake should complete.

-Tim

When I telnet mail2.linode.com 25 it works. So it seems that my IP is not blocking port 25.

What's your servers IP? Also post the content of your postfix configuration file.

Hi Obs,

server ip is: 176.58.103.37

here is the content of main.cf :

Debian specific: Specifying a file name will cause the first

line of that file to be used as the name. The Debian default

is /etc/mailname.

myorigin = /etc/mailname

smtpdbanner = $myhostname ESMTP $mailname (Debian/GNU)

biff = no

appending .domain is the MUA's job.

appenddotmydomain = no

Uncomment the next line to generate "delayed mail" warnings

delaywarningtime = 4h

readme_directory = /usr/share/doc/postfix

TLS parameters

smtpdtlscert_file = /etc/postfix/smtpd.cert

smtpdtlskey_file = /etc/postfix/smtpd.key

smtpdusetls = yes

smtpdtlssessioncachedatabase = btree:${datadirectory}/smtpdscache

smtptlssessioncachedatabase = btree:${datadirectory}/smtpscache

See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for

information on enabling SSL in the smtp client.

myhostname = mirrabooka.eu

alias_maps = hash:/etc/aliases

alias_database = hash:/etc/aliases

myorigin = /etc/mailname

mydestination = mirrabooka.eu, localhost, localhost.localdomain

relayhost =

mynetworks = 127.0.0.0/8

mailboxsizelimit = 0

recipient_delimiter = +

inet_interfaces = all

html_directory = /usr/share/doc/postfix/html

messagesizelimit = 30720000

virtualaliasdomains =

virtualaliasmaps = proxy:mysql:/etc/postfix/mysql-virtualforwardings.cf, mysql:/etc/postfix/mysql-virtualemail2email.cf

virtualmailboxdomains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf

virtualmailboxmaps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf

virtualmailboxbase = /home/vmail

virtualuidmaps = static:5000

virtualgidmaps = static:5000

smtpdsaslauth_enable = yes

brokensaslauth_clients = yes

smtpdsaslauthenticated_header = yes

smtpdrecipientrestrictions = permitmynetworks, permitsaslauthenticated, rejectunauth_destination

virtualcreatemaildirsize = yes

virtualmaildirextended = yes

proxyreadmaps = $localrecipientmaps $mydestination $virtualaliasmaps $virtualaliasdomains $virtualmailboxmaps $virtualmailboxdomains $relayrecipientmaps $relaydomains $canonicalmaps $sendercanonicalmaps $recipientcanonicalmaps $relocatedmaps $transportmaps $mynetworks $virtualmailboxlimit_maps

virtual_transport = dovecot

dovecotdestinationrecipient_limit = 1

What's the output of grep ^vmail /etc/group /etc/passwd; ls -l /home | grep vmail

Hi,

the output of that command is:

$ grep ^vmail /etc/group /etc/passwd; ls -l /home | grep vmail

/etc/group:vmail:x:5000:

/etc/passwd:vmail:x:5000:5000::/home/vmail:/bin/sh

drwxr-xr-x 2 vmail vmail 4096 Oct 11 20:40 vmail

Well the error Oct 12 03:36:07 (none) postfix/master[20444]: fatal: /etc/postfix/master.cf: line 111: bad transport type: user=vmail:vmail is why it's not starting, however you do have the vmail user and it looks fine.

I don't have a debian box handy to test the tutorial out on, I'd suggest try running through it again maybe you missed a step. If that doesn't work post the contents of your /etc/postfix/master.cf

@obs:

Well the error Oct 12 03:36:07 (none) postfix/master[20444]: fatal: /etc/postfix/master.cf: line 111: bad transport type: user=vmail:vmail is why it's not starting, however you do have the vmail user and it looks fine.

I don't have a debian box handy to test the tutorial out on, I'd suggest try running through it again maybe you missed a step. If that doesn't work post the contents of your /etc/postfix/master.cf

Typically "transport type" would be "unix" here; it's the second parameter of the master.cf entry.

Two guesses:

1) Leading spaces have got lost in the second line of the "dovecot" entry and so it thinks it's a new entry

2) An error in the line above

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct