Send a test mail using Telnet

Emulating an SMTP session with Telnet

Let us try to send an email to the user now. As the "example.com" domain does not really existing your DNS settings will likely not point to the right server. So we are simulating an SMTP session with the telnet command. Install the telnet package if you haven't already:

$> aptitude install telnet

Then establish a TCP connection to the SMTP port:

$> telnet localhost smtp

The server should reply:

Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 mailtest ESMTP Postfix (Debian/GNU)

Great. Postfix is listening and wants us to speak SMTP. First we need to be friendly:

ehlo example.com

Postfix appreciates our friendliness and tells us which features it provides:

250-my-new-mailserver
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN

Hey, Postfix, we have a mail from steve@example.com:

mail from:<steve@example.com>

Looks like Postfix is happy with that because return codes that start with a '2' are good news:

250 2.1.0 Ok

Tell Postfix who the recipient of the mail is:

rcpt to:<john@example.com>

Postfix accepts that:

250 2.1.5 Ok

Then we are ready to send the actual mail:

data

Postfix agrees and tells us we can send the actual mail now and end our input with a dot on an empty line:

354 End data with <CR><LF>.<CR><LF>

Okay, type in the mail:

Hi John,

just wanted to drop you a note.
.

Postfix tells us it has received the mail and queued under a queue ID:

250 2.0.0 Ok: queued as A9D64379C4

Thanks, Postfix, we are done:

quit

Checking the logs

Take a look at the /var/log/mail.log file now. You should see something similar to:

postfix/smtpd[...]: connect from localhost[127.0.0.1]
postfix/smtpd[...]: 5FF712A6: client=localhost[127.0.0.1]
postfix/cleanup[...]: 5FF712A6: message-id=<...>
postfix/qmgr[...]: 5FF712A6: from=<steve@example.com>, size=364, nrcpt=1 (queue active)
postfix/pipe[...]: 5FF712A6: to=<john@example.com>, relay=dovecot, ..., status=sent (delivered via dovecot service)
postfix/qmgr[...]: 5FF712A6: removed
postfix/smtpd[...]: disconnect from localhost[127.0.0.1]

The delivery has worked. Postfix has correctly determined that the destination domain is a virtual domain and forwarded the email to the 'dovecot' service.

Checking the user's mailbox

The email should now be somewhere under /var/vmail/example.com/john. Let us take a look:

$> cd /var/vmail/example.com/john/Maildir
$> find
.
./cur
./new
./new/1179521979.V801I2bbf7M15352.mailtest
./tmp

There sits the email. Try to read the mail with the "mutt" program:

$> mutt -f .

The new email is shown:

q:Quit  d:Del  u:Undel  s:Save  m:Mail  r:Reply  g:Group  ?:Help
   1 N   May 18 steve@example.c (0.1K)

Press ENTER to read the email:

From: steve@example.com
To: undisclosed-recipients: ;

Hi John,

just wanted to drop you a note.

So the email arrived at John's account. Perfect. Choose 'q' twice to exit mutt again.

104 Comments

Hi Anonymous, there seems to

Hi Anonymous, there seems to be something wrong with your installation or the paths that you set. Try: cd / find / -name auth-master and check what path it is in. It has to match the auth-master path in your dovecot.conf "auth_socket_path = YOUR PATH HERE" Hope that solved it for you

keine datei vorhanden...

Erstmal vielen dank, alles soweit bestens. 

Die Email-Weiterleitung klappt ohne weiteres, jedoch speichert er keine Emails auf dem Server unter /var/vmail... 

(mail_location = maildir:/var/vmail/%d/%n/Maildir hab ich überprüft)

mfg

Test email not delivered

Let me first say.. Thank you for both the turorial, but also the continued help with implementation.

I've got a problem and I'm not sure where to look.  From the above example test email my log shows  a deferred status and temporary failure.

 

tail -f /var/log/mail.log

May 21 07:23:24 mail2 postfix/smtpd[1159]: 79BB4680A6C: client=localhost[127.0.0.1]
May 21 07:23:48 mail2 postfix/cleanup[1178]: 79BB4680A6C: message-id=<20100521142324.79BB4680A6C@mail2.emailserverdomain.net>
May 21 07:23:48 mail2 postfix/qmgr[1100]: 79BB4680A6C: from=<steve@example.com>, size=369, nrcpt=2 (queue active)
May 21 07:23:48 mail2 postfix/pipe[1181]: 79BB4680A6C: to=<john@example.com>, relay=dovecot, delay=31, delays=31/0.01/0/0.05, dsn=4.3.0, status=deferred (temporary failure)
May 21 07:23:49 mail2 postfix/smtp[1180]: 79BB4680A6C: to=<devnull@workaround.org>, orig_to=<john@example.com>, relay=mx.workaround.org[85.214.93.191]:25, delay=32, delays=31/0.01/0.53/0.84, dsn=5.7.1, status=bounced (host mx.workaround.org[85.214.93.191] said: 554 5.7.1 Service unavailable; Sender address [steve@example.com] blocked using dsn.rfc-ignorant.org; Not supporting null originator (DSN) (in reply to RCPT TO command))
May 21 07:23:49 mail2 postfix/cleanup[1178]: 9DFBA680ABE: message-id=<20100521142349.9DFBA680ABE@mail2.emailserverdomain.net>
May 21 07:23:49 mail2 postfix/bounce[1184]: 79BB4680A6C: sender non-delivery notification: 9DFBA680ABE
May 21 07:23:49 mail2 postfix/qmgr[1100]: 9DFBA680ABE: from=<>, size=2573, nrcpt=1 (queue active)
May 21 07:23:49 mail2 postfix/pipe[1181]: 9DFBA680ABE: to=<steve@example.com>, relay=dovecot, delay=0.07, delays=0.03/0/0/0.04, dsn=4.3.0, status=deferred (temporary failure)
May 21 07:23:52 mail2 postfix/smtpd[1159]: disconnect from localhost[127.0.0.1]
 

And again using my actual domain

May  21 07:11:43 mail2 postfix/smtpd[1143]: connect from localhost[127.0.0.1]
May 21 07:12:16 mail2 postfix/smtpd[1143]: 1D3FB680A6C: client=localhost[127.0.0.1]
May 21 07:12:29 mail2 postfix/cleanup[1148]: 1D3FB680A6C: message-id=<20100521141216.1D3FB680A6C@mail2.commspeed.net>
May 21 07:12:29 mail2 postfix/qmgr[1100]: 1D3FB680A6C: from=<aldacct@gmailcom>, size=372, nrcpt=2 (queue active)
May 21 07:12:29 mail2 postfix/pipe[1150]: 1D3FB680A6C: to=<john@example.com>, relay=dovecot, delay=20, delays=20/0.01/0/0.04, dsn=4.3.0, status=deferred (temporary failure)
May 21 07:12:32 mail2 postfix/smtp[1149]: 1D3FB680A6C: to=<devnull@workaround.org>, orig_to=<john@example.com>, relay=mx.workaround.org[85.214.93.191]:25, delay=23, delays=20/0.01/1.5/1.5, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 4338B2340BAE)
May 21 07:12:34 mail2 postfix/smtpd[1143]: disconnect from localhost[127.0.0.1]

root@mail2:/home/admin# telnet localhost smtp
Trying ::1...
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 mail2.commspeed.net ESMTP Postfix (Ubuntu)
mail from:<steve@example.com>
250 2.1.0 Ok
rcpt to:<john@example.com>
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
Hi All,

So far so good....
.
250 2.0.0 Ok: queued as 79BB4680A6C
quit
221 2.0.0 Bye
Connection closed by foreign host.

Telnet Not working

Hi

 

I've done every steps, averything fine till now

 

I make telnet localhost smtp

 

and then apears only the first 3 lines less the 220 mailtest post fix.......

 

I've tried looking for what happen but nothing .....

 

anyone?

 

I've seen someone with same problem but reinstalling postfix... I've done apt-get purge postfix and when I start the configuration  doesn't work the postmap

New topic as there is no button on the page to start a new threa

I followed the copy and paste in this guide, and it went well until I tried to send an email.

Bear in mind, I have copied verbatim from the page, other than the hostname, which is fred.info, and this is reflected in the

/etc/hosts and the postfix main.cf:

mydestination = logout.fred.info, logout, localhost.localdomain, localhost

 

**** Here is the action:

# telnet 127.0.0.1 25
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
220 logout ESMTP Postfix (Debian/GNU)
ehlo example.com
250-logout
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
mail from:<steve@example.com>
250 2.1.0 Ok
rcpt to:<john@example.com>
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
Subject: TEST
adhakjdhaskdhasd  blah
.
250 2.0.0 Ok: queued as 8B12A40925
quit
221 2.0.0 Bye

 

**** Here is the result in the mail file:

Dec 30 16:01:27 logout postfix/smtpd[10334]: connect from localhost[127.0.0.1]
Dec 30 16:01:46 logout postfix/smtpd[10334]: 8B12A40925: client=localhost[127.0.0.1]
Dec 30 16:02:04 logout postfix/cleanup[10342]: 8B12A40925: message-id=<20101230150146.8B12A40925@logout>
Dec 30 16:02:04 logout postfix/qmgr[10274]: 8B12A40925: from=<steve@example.com>, size=352, nrcpt=2 (queue active)
Dec 30 16:02:04 logout postfix/pipe[10346]: 8B12A40925: to=<john@example.com>, relay=dovecot, delay=23, delays=23/0.01/0/0.01, dsn=4.3.0, status=deferred (temporary failure)
Dec 30 16:02:04 logout postfix/smtp[10345]: 8B12A40925: to=<devnull@workaround.org>, orig_to=<john@example.com>, relay=mx.workaround.org[85.214.93.191]:25, delay=24, delays=23/0.01/0.48/0.03, dsn=5.5.2, status=bounced (host mx.workaround.org[85.214.93.191] said: 504 5.5.2 <logout>: Helo command rejected: need fully-qualified hostname (in reply to RCPT TO command))
Dec 30 16:02:04 logout postfix/cleanup[10342]: D063F40939: message-id=<20101230150204.D063F40939@logout>
Dec 30 16:02:04 logout postfix/qmgr[10274]: D063F40939: from=<>, size=2293, nrcpt=1 (queue active)
Dec 30 16:02:04 logout postfix/bounce[10349]: 8B12A40925: sender non-delivery notification: D063F40939
Dec 30 16:02:04 logout postfix/pipe[10346]: D063F40939: to=<steve@example.com>, relay=dovecot, delay=0.01, delays=0/0/0/0, dsn=4.3.0, status=deferred (temporary failure)
Dec 30 16:02:07 logout postfix/smtpd[10334]: disconnect from localhost[127.0.0.1]

**** I notice that these directories were not created
# ls /var/vmail/example.com/john/Maildir
ls: cannot access /var/vmail/example.com/john/Maildir: No such file or directory
# ls /var/vmail/example.com/john/
ls: cannot access /var/vmail/example.com/john/: No such file or directory
# ls /var/vmail/example.com/
ls: cannot access /var/vmail/example.com/: No such file or directory
# ls /var/vmail/
 

Does anyone know how to solvet his mess up.   

Addiionally, I noticed that one can only have example.com in the database. I tried to add fred.info but this was denied:

mysql> INSERT INTO virtual_domains (id, name) VALUES (1, 'fred.info');
ERROR 1062 (23000): Duplicate entry '1' for key 'PRIMARY'
It is likely that I misread this tutorial goals. I thought one could have multiple virtual domains on the server :(

 

It would be grate if someone could give me some advice?


Best wishes, s

Ok, got stuck here

So far all settings and tests worked fine. All required packages were installed. Only postfix was already installed. I think settings that were already made are now messing up my new email server. Can someone do a cfg check :

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
inet_interfaces = all
mailbox_size_limit = 0
mydestination = p0wnd.nl, localhost.localdomain, localhost
myhostname = blackops.p0wnd.nl
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = p0wnd.nl
readme_directory = no
recipient_delimiter = +
relay_domains = p0wnd.nl; enemyterritory.biz
relayhost =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_client_restrictions = reject_rbl_client dnsbl.sorbs.netvirtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
smtpd_helo_restrictions = reject_invalid_helo_hostname,        reject_non_fqdn_helo_hostname,        reject_unknown_helo_hostname
smtpd_recipient_restrictions = reject_invalid_hostname,        reject_unknown_recipient_domain,        reject_unauth_destination,        reject_rbl_client sbl.spamhaus.org,        permit
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf,mysql:/etc/postfix/mysql-email2email.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
virtual_transport = dovecot

 

With this conf I get stuck at :

rcpt to:....

I get "451 4.3.5 Server configuration error"

 

When I remove all smtpd lines, it will have no problems with th test mail, BUT there also is no mailbox made in /var/vmail

WTF… :)

Why is your mail.log empty? Did you remove it? If so: restart Postfix and make sure there's something in the mail.log

No idea why auth server is

No idea why auth server is missing. Which package does it belong too ?

May 31 19:11:34 blackops postfix/qmgr[6139]: DF836CD05A9: from=<double-bounce@blackops.p0wnd.nl>, size=972, nrcpt=1 (queue active)
May 31 19:11:34 blackops postfix/qmgr[6139]: B747CCD05B0: from=<double-bounce@blackops.p0wnd.nl>, size=972, nrcpt=1 (queue active)
May 31 19:11:34 blackops postfix/qmgr[6139]: 6A444CD05A0: from=<double-bounce@blackops.p0wnd.nl>, size=972, nrcpt=1 (queue active)
May 31 19:11:34 blackops postfix/qmgr[6139]: 2E86ECD05AF: from=<double-bounce@blackops.p0wnd.nl>, size=972, nrcpt=1 (queue active)
May 31 19:11:34 blackops postfix/qmgr[6139]: 21142CD05A8: from=<double-bounce@blackops.p0wnd.nl>, size=972, nrcpt=1 (queue active)
May 31 19:11:34 blackops postfix/qmgr[6139]: E49BCCD059E: from=<double-bounce@blackops.p0wnd.nl>, size=972, nrcpt=1 (queue active)
May 31 19:11:34 blackops postfix/qmgr[6139]: 503C3CD05AD: from=<double-bounce@blackops.p0wnd.nl>, size=972, nrcpt=1 (queue active)
May 31 19:11:34 blackops postfix/qmgr[6139]: 008A4CD059F: from=<double-bounce@blackops.p0wnd.nl>, size=972, nrcpt=1 (queue active)
May 31 19:11:34 blackops deliver(postmaster@p0wnd.nl): Can't connect to auth server at /var/run/dovecot/auth-master: No such file or directory
May 31 19:11:34 blackops deliver(postmaster@p0wnd.nl): Can't connect to auth server at /var/run/dovecot/auth-master: No such file or directory
May 31 19:11:34 blackops deliver(postmaster@p0wnd.nl): Can't connect to auth server at /var/run/dovecot/auth-master: No such file or directory
May 31 19:11:34 blackops deliver(postmaster@p0wnd.nl): Can't connect to auth server at /var/run/dovecot/auth-master: No such file or directory
May 31 19:11:34 blackops deliver(postmaster@p0wnd.nl): Can't connect to auth server at /var/run/dovecot/auth-master: No such file or directory
May 31 19:11:34 blackops postfix/pipe[6806]: B747CCD05B0: to=<postmaster@p0wnd.nl>, orig_to=<postmaster>, relay=dovecot, delay=392, delays=392/0/0/0.02, dsn=4.3.0, status=deferred (temporary failure)
May 31 19:11:34 blackops postfix/pipe[6811]: 2E86ECD05AF: to=<postmaster@p0wnd.nl>, orig_to=<postmaster>, relay=dovecot, delay=513, delays=513/0.01/0/0.02, dsn=4.3.0, status=deferred (temporary failur
e)
May 31 19:11:34 blackops postfix/pipe[6808]: 6A444CD05A0: to=<postmaster@p0wnd.nl>, orig_to=<postmaster>, relay=dovecot, delay=4507, delays=4507/0.01/0/0.02, dsn=4.3.0, status=deferred (temporary fail
ure)
May 31 19:11:34 blackops postfix/pipe[6793]: DF836CD05A9: to=<postmaster@p0wnd.nl>, orig_to=<postmaster>, relay=dovecot, delay=2370, delays=2370/0.01/0/0.03, dsn=4.3.0, status=deferred (temporary fail
ure)
May 31 19:11:34 blackops postfix/pipe[6814]: 21142CD05A8: to=<postmaster@p0wnd.nl>, orig_to=<postmaster>, relay=dovecot, delay=2399, delays=2399/0.01/0/0.01, dsn=4.3.0, status=deferred (temporary fail
ure)
May 31 19:11:34 blackops deliver(postmaster@p0wnd.nl): Can't connect to auth server at /var/run/dovecot/auth-master: No such file or directory
May 31 19:11:34 blackops deliver(postmaster@p0wnd.nl): Can't connect to auth server at /var/run/dovecot/auth-master: No such file or directory
May 31 19:11:34 blackops deliver(postmaster@p0wnd.nl): Can't connect to auth server at /var/run/dovecot/auth-master: No such file or directory
May 31 19:11:34 blackops postfix/pipe[6793]: 503C3CD05AD: to=<postmaster@p0wnd.nl>, orig_to=<postmaster>, relay=dovecot, delay=1083, delays=1083/0.03/0/0.02, dsn=4.3.0, status=deferred (temporary fail
ure)
May 31 19:11:34 blackops postfix/pipe[6806]: 008A4CD059F: to=<postmaster@p0wnd.nl>, orig_to=<postmaster>, relay=dovecot, delay=4653, delays=4653/0.03/0/0.02, dsn=4.3.0, status=deferred (temporary fail
ure)
May 31 19:11:34 blackops postfix/pipe[6811]: E49BCCD059E: to=<postmaster@p0wnd.nl>, orig_to=<postmaster>, relay=dovecot, delay=4687, delays=4687/0.03/0/0.02, dsn=4.3.0, status=deferred (temporary fail
ure)
May 31 19:12:32 blackops postfix/cleanup[6822]: 7822DCD05B2: message-id=<20100531171232.7822DCD05B2@blackops.p0wnd.nl>
May 31 19:12:32 blackops postfix/smtpd[6788]: disconnect from smtp-vbr15.xs4all.nl[194.109.24.35]
May 31 19:12:32 blackops postfix/qmgr[6139]: 7822DCD05B2: from=<double-bounce@blackops.p0wnd.nl>, size=972, nrcpt=1 (queue active)
May 31 19:12:32 blackops deliver(postmaster@p0wnd.nl): Can't connect to auth server at /var/run/dovecot/auth-master: No such file or directory
May 31 19:12:32 blackops postfix/pipe[6808]: 7822DCD05B2: to=<postmaster@p0wnd.nl>, orig_to=<postmaster>, relay=dovecot, delay=0.03, delays=0.02/0/0/0, dsn=4.3.0, status=deferred (temporary failure)
May 31 19:15:52 blackops postfix/anvil[6790]: statistics: max connection rate 1/60s for (smtp:194.109.24.38) at May 31 19:10:01
May 31 19:15:52 blackops postfix/anvil[6790]: statistics: max connection count 1 for (smtp:194.109.24.38) at May 31 19:10:01
May 31 19:15:52 blackops postfix/anvil[6790]: statistics: max cache size 1 at May 31 19:10:01
May 31 19:16:34 blackops postfix/qmgr[6139]: C4276CD05AE: from=<double-bounce@blackops.p0wnd.nl>, size=972, nrcpt=1 (queue active)
May 31 19:16:34 blackops postfix/qmgr[6139]: 05980CD05A1: from=<double-bounce@blackops.p0wnd.nl>, size=972, nrcpt=1 (queue active)
May 31 19:16:34 blackops postfix/qmgr[6139]: 07E8FCD05B1: from=<double-bounce@blackops.p0wnd.nl>, size=972, nrcpt=1 (queue active)
May 31 19:16:34 blackops deliver(postmaster@p0wnd.nl): Can't connect to auth server at /var/run/dovecot/auth-master: No such file or directory
May 31 19:16:34 blackops deliver(postmaster@p0wnd.nl): Can't connect to auth server at /var/run/dovecot/auth-master: No such file or directory
May 31 19:16:34 blackops deliver(postmaster@p0wnd.nl): Can't connect to auth server at /var/run/dovecot/auth-master: No such file or directory
May 31 19:16:34 blackops postfix/pipe[6843]: 05980CD05A1: to=<postmaster@p0wnd.nl>, orig_to=<postmaster>, relay=dovecot, delay=4533, delays=4532/0.01/0/0.02, dsn=4.3.0, status=deferred (temporary fail
ure)
May 31 19:16:34 blackops postfix/pipe[6842]: C4276CD05AE: to=<postmaster@p0wnd.nl>, orig_to=<postmaster>, relay=dovecot, delay=960, delays=960/0.01/0/0.03, dsn=4.3.0, status=deferred (temporary failur
e)
May 31 19:16:34 blackops postfix/pipe[6846]: 07E8FCD05B1: to=<postmaster@p0wnd.nl>, orig_to=<postmaster>, relay=dovecot, delay=393, delays=392/0.01/0/0.02, dsn=4.3.0, status=deferred (temporary failur
e)

Permissions

Either Dovecot isn't using vmail:vmail permissions or /var/vmail doesn't belong to vmail:vmail. You may want to check that.

Maybe its dovecot ?   #

Maybe its dovecot ?

 

# 1.0.15: /etc/dovecot/dovecot.conf
log_timestamp: %Y-%m-%d %H:%M:%S
protocols: imap imaps pop3 pop3s
disable_plaintext_auth: no
login_dir: /var/run/dovecot/login
login_executable(default): /usr/lib/dovecot/imap-login
login_executable(imap): /usr/lib/dovecot/imap-login
login_executable(pop3): /usr/lib/dovecot/pop3-login
mail_privileged_group: mail
mail_location: maildir:/home/vmail/%d/%n
mail_executable(default): /usr/lib/dovecot/imap
mail_executable(imap): /usr/lib/dovecot/imap
mail_executable(pop3): /usr/lib/dovecot/pop3
mail_plugin_dir(default): /usr/lib/dovecot/modules/imap
mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/modules/pop3
pop3_uidl_format(default):
pop3_uidl_format(imap):
pop3_uidl_format(pop3): %08Xu%08Xv
auth default:
  user: vmail
  passdb:
    driver: pam
  passdb:
    driver: sql
    args: /etc/dovecot/dovecot-sql.conf
  userdb:
    driver: passwd
  userdb:
    driver: sql
    args: /etc/dovecot/dovecot-sql.conf
 

Messages not deliverd

Hi there, once again I'm here for help... This is the log message I recieve when trying to send emails locally

<b>relay=dovecot, delay=0.07, delays=0.03/0.02/0/0.02, dsn=4.3.0, status=deferred (temporary failure)</b>

The dovecot service is running as I can connect to the directories. Could you possibly point me towards the direction for resolving this...


 

clamav from volatile

Just an f.y.i  Not sure why, but on my VPS, clamav from Debian Lenny "stable" kept seg faulting on me.    I ended up having to nab the clamav (and some related packages) from volatile.  I added the following to my /etc/apt/sources.list and 'apt-get update && apt-get upgrade'

deb http://volatile.debian.org/debian-volatile lenny/volatile main contrib non-free

Fehler bei Testmail


Hallo Herr Haas

ich scheitere auch an der Testmail.

Der Log sagt:

Aug 26 12:38:04 linbox postfix/smtpd[2700]: connect from localhost[127.0.0.1]
Aug 26 12:38:40 linbox postfix/trivial-rewrite[2703]: warning: do not list domain linbox.home in BOTH mydestination and virtual_mailbox_domains
Aug 26 12:38:40 linbox postfix/smtpd[2700]: D456831DF2: client=localhost[127.0.0.1]
Aug 26 12:38:50 linbox postfix/cleanup[2704]: D456831DF2: message-id=<20100826103840.D456831DF2@linbox.home>
Aug 26 12:38:50 linbox postfix/qmgr[2696]: D456831DF2: from=<tester@test.test>, size=349, nrcpt=1 (queue active)
Aug 26 12:38:50 linbox postfix/trivial-rewrite[2703]: warning: do not list domain linbox.home in BOTH mydestination and virtual_mailbox_domains
......

Ich habe aber die virtuelle Domain in der Datenbank eingerichtet

linbox:~# postmap -q linbox.home  mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
1
linbox:~#

und auch in der /etc/postfix/main.cf steht es. (dort habe ich nichts per Hand gemacht, da es in der Anleitung nicht steht)



linbox:~# cat /etc/postfix/main.cf
--- schnipp ---

myhostname = linbox.home
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = linbox.home, localhost.home, , localhost

--- schnipp ---

virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf,mysql:/etc/postfix/mysql-email2email.cf
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1
linbox:~#

Wo ist denn nun der Fehler zu suchen. habe alles mehrmals gecheckt, kann aber nichts finden.

 

Freundliche Grüße

Mario

DB Authentification fails in Dovecot (?)

Hello,
great work ;-)
Sorry to tell I have a major problem with the authentification:
postfix seems working right.
In mail.log I get a fatal-error:
     pipe: fatal: unknown attribute name: args=/usr/lib/dovecot/deliver
followed by a:
     qmgr: warning: private/dovecot socket: malformed response
     qmgr: warning: transport dovecot failure

After some checks I realised, that the MD5 Password in the MySQL DB and die Dovecot Password (exp.: dovecotpw -p summersun) differs.
Dovecot uses HMAC-MD5.
Even when I insert the HMAC-MD5 Hash in the MySQL row, i still get (see next tutorial page) no Dovecot-DB Connect:
I tried:
     telnet localhost pop3
:>  user john@example.com
      +OK
:>   pass summersun
      -ERR Unsupported authentification mechanism

So in my dovecot.conf I tried to change the "mechanisms = ..." in auth default (), checked and rechecked dovecot-sql.conf, with "connect", "default_pass_scheme" and verified the password_query.

Nothing helps, I am stuck. Any Ideas? Thanks ;-)
(Need any logs, confs? - i didnt want to BLOW my posting ...)
Greetings Immo

I suggest you fix the first

I suggest you fix the first error first before attempting too much random guessing.

     pipe: fatal: unknown attribute name: args=/usr/lib/dovecot/deliver

…probably means that you have a typo in your /etc/postfix/master.cf. Like a missing indentation. You may want to check that first.

 Christoph

/etc/aliases.db

If you get

fatal: open database /etc/aliases.db: No such file or directory

and the file really does not exist, just smash newaliases into your konsole and you're fine ;)

mysql-virtual-mailbox-domains.cf(0,lock|fold_fix): table lookup

Wonderful howto, using ubuntu 10.04 and got the following problem:

/var/log/mail.err
Oct  7 18:33:40 mishki postfix/trivial-rewrite[28254]: fatal: mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf(0,lock|fold_fix): table lookup problem

mysql-virtual-mailbox-domains.cf
user = mailuser
password = PASS
hosts = 127.0.0.1
dbname = mailserver
query = SELECT 1 FROM virtual_users WHERE name='%s'

using main.cf:

virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps.cf,mysql:/etc/postfix/mysql-email2email.cf
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1


mysql-email2email.cf:

user = mailuser
password = PASS
hosts = 127.0.0.1
dbname = mailserver
query = SELECT email FROM virtual_users WHERE email='%s'


mysql-virtual-alias-maps.cf:

user = mailuser
password = PASS
hosts = 127.0.0.1
dbname = mailserver
query = SELECT destination FROM virtual_aliases WHERE source='%s'

 


mysql-virtual-mailbox-maps.cf:
user = mailuser
password = PASS
hosts = 127.0.0.1
dbname = mailserver
query = SELECT 1 FROM virtual_users WHERE email='%s'
 

A tail /var/syslog gives:

Oct  7 18:33:42 mishki postfix/trivial-rewrite[28255]: warning: mysql query failed: Unknown column 'name' in 'where clause'
Oct  7 18:33:42 mishki postfix/trivial-rewrite[28255]: fatal: mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf(0,lock|fold_fix): table lookup problem

wft 'in clause' ...

Any help apreciated ;)

The SQL query is: query =

The SQL query is:

query = SELECT 1 FROM virtual_users WHERE name='%s'

So the WHERE clause is

WHERE name='%s'

but apparently your 'virtual_users' table doesn't have a 'name' column.

Thanks, but


The Tutorial says: "
CREATE TABLE `virtual_users` (
  `id` int(11) NOT NULL auto_increment,
  `domain_id` int(11) NOT NULL,
  `password` varchar(32) NOT NULL,
  `email` varchar(100) NOT NULL,
  PRIMARY KEY  (`id`),
  UNIQUE KEY `email` (`email`),
  FOREIGN KEY (domain_id) REFERENCES virtual_domains(id) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
"
So there should be no column named "name". 
Becuase the mail-address is their login, should i replace in mysql-virtual-mailbox-domains.cf     
        query = SELECT 1 FROM virtual_users WHERE name='%s'
with    query = SELECT 1 FROM virtual_users WHERE email='%s'

?

replaced in

replaced in mysql-virtual-mailbox-domains.cf     
        query = SELECT 1 FROM virtual_users WHERE name='%s'
with    query = SELECT 1 FROM virtual_users WHERE email='%s'

what leads to an accepting of the query and ending up in:

postfix/local[31914]: 41E49120FA2: to=<zimmer@mishki.gammi.de>, relay=local, delay=16, delays=16/0.01/0/0.01, dsn=5.1.1, status=bounced (unknown user: "zimmer")

creating a local user named zimmer soled it, but i want to get mail to the virtual users in my mql-db.
Reading through the internet did not resolve in any appyable information :(

Damn, thanks ;)

Looked again at *-mailbox-domains.cf.

query = SELECT 1 FROM virtual_domains WHERE name='%s'   #like tutorial says
#query = SELECT 1 FROM virtual_users WHERE email='%s'     fail!

Looks better, still getting error Unknown user and relay=local instead of relay=dovecot.
Further _more careful_ reading suggested, bouncing config. ;)

Many thanks to you for your patience.
 

Error connecting to IMAP server: localhost.

Hi,

 

Can someone help me to work this out: everything works fine until I've tried to access the email using squirrelmail. The error I got is in the subject field. I don't understand/see what's going wrong. I can connect to imap server using the command line but it does work using the webmail tool. Very strange to me. I using dovecot, openBSD 4.7 and mysql.

 

Thank you for any help.

Fatal: setgid(500) failed

Hi,

I've read through all those comments but can't seem to find a solution.

There is no /var/vmail/example.com being created, although user vmail is the owner of /var/vmail.

My testmail to john@example.com aren't being delivered, the mail.log says:

to=<john@example.com>, relay=dovecot, delay=1148, delays=1148/0.04/0/0.03, dsn=4.3.0,
status=deferred (temporary failure)

And the dovecot-deliver.log:

2010-11-17 18:02:51 auth(default): Info: passwd(john@example.com): unknown user
2010-11-17 18:02:51 deliver(john@example.com): Fatal: setgid(500) failed with euid=5000(vmail),
gid=5000(vmail), egid=5000(vmail): Operation not permitted (This binary should probably be called with
process group set to 500 instead of 5000(vmail))


Where is my mistake? I think I did everything according to your tutorial.

Greetings,

Silberwoelfin

Operation not permitted

I am having the very same type of problem and I am on  Dovecot v2.0.13.

 

dovecot: lda(example@example.com): Fatal: setgid(1000(example) from userdb lookup) failed with euid=5000(vmail), gid=5000(vmail), egid=5000(vmail): Operation not permitted (This binary should probably be called with process group set to 1000(example) instead of 5000(vmail))
 

Not sure where the permission for 1000(example) is coming from.

exmaple.com

One observation about the guide.  Make it very clear that the exmaple you use, exmaple.com, should be replaced with your own domain name.

I did not, and used exmaple.com, which mean, afterwards meant I had to reinstall the whole lot again with my own domain :(

Very painful.  Not that it mattered, because in each case I never got email delivery to Dovecot to work.  Gave up and used a company instead.

dovecot: Can't open log file /var/vmail/dovecot-deliver.log

problem:

Dovecot does not creat anything in /var/vmail, and cannot write to the log file.

 

Error message:

Jan  3 14:58:25 fred postfix/pipe[27350]: 533E981170: to=<fred@fred.info>, relay=dovecot, delay=23, delays=23/0.01/0/0.01, dsn=4.3.0, status=deferred (temporary failure. Command output: Can't open log file /var/vmail/dovecot-deliver.log: Permission denied )

# cd /var/vmail

# ls -ld
drwxrwx--- 2 vmail vmail 4096 Jan  3 14:40 .
l# ls -l dovecot-deliver.log
-rw-rw---- 1 root dovecot 0 Jan  3 14:40 dovecot-deliver.log

 

What should the permissions be on the dovevot-deliver.log and the /var/vmail dir.

problem with dovecot

Hi I have problem with my dovecot.

Does anyone have idea what I did wrong 

log output below

Thank You

Adrian

postfix/pipe[2760]: 4614A100F907: to=test@test.pl, relay=dovecot, delay=0.1, delays=0.06/0.01/0/0.03, dsn=5.3.0, status=bounced (command line usage error. Command output: Fatal: Unknown argument: ==================================================================== Usage: deliver [-c <config file>] [-a <address>] [-d <username>] [-p <path>]                [-f <envelope sender>] [-m <mailbox>] [-n] [-s] [-e] [-k] )
 

re: problem with dovecot

Hi,

first of all: Great tutorial! Thanks for your work!

I have the same problem.

Mar 31 10:23:34 blabla postfix/pipe[3221]: 88EE1CCEFA: to=<xxx@blabla.org>, relay=dovecot, delay=0.03, delays=0.02/0/0/0.01, dsn=5.3.0, status=bounced (command line usage error. Command output: Fatal: Unknown argument: # Usage: deliver [-c <config file>] [-a <address>] [-d <username>] [-p <path>]                [-f <envelope sender>] [-m <mailbox>] [-n] [-s] [-e] [-k] )

@Adrian: did you find a solution?

anyone else?

btw i m using debian squeeze so may be its related to that...

Thanks!

Error from Milter-filter

I get the following error code, if I send an email to any of my universitys adresses.

<user@university.de>: host m-relay.rz.university.de[*.*.*.*] said:
    451 4.7.1 milter-regex reject:  sender ip address does not resolve (in
    reply to RCPT TO command)


Has anybody an idea how to fix that problem?

relay access denied

hallo cristoph,

vielen dank für dein wunderbares howto.

seit einigen tagen habe ich das problem, dass ich über SSL/smtp keinerlei mails mehr verschicken kann. in /var/log/mail.log findet sich keinerlei aufzeichnung über das problem. unter roundcube in de logs findet sich der eintrag:

 

[07-Jun-2011 13:03:16] Connection refused (111): 
[07-Jun-2011 13:03:16] Failed to connect socket: Connection refused (): 
[07-Jun-2011 13:03:16 +0200]: SMTP Error: SMTP error: Connection failed: Failed to connect socket: Connection refused in /var/www/roundcube/program/steps/mail/func.inc on line 1501 (POST /roundcube/?_unlock=loading1307444591929?_task=mail&_action=send)
 
selbiges problem erhalte ich auch unter thunderbird.
 
versuche ich nun nach deinem tutorial zu gehen und eine erste mail über telnet zu versenden, erhalte ich beim empfänger (egal ob lokal oder entfernte mailadresse) immer ein relay access denied.
 
ich habe das "gefühl", dass dieses problem besteht, seitdem dovecot einmal probleme hatte mit der serverzeit, die rücklagig war. mein provider hat dieser fehler im kernel des host gefixt und mein vserver wurde neugestartet.
 
an den conf-dateien wurde aber NICHTS geändert.
 
weiterhin möchte ich sagen, dass es KEINE probleme gibt, sofern ich die mail ohne tls/ssl versende.
 
lediglich bei dem sicheren zugang ist ein abruf der mails mit imap kein problem, aber eben der versand.
 
weisst du einen rat?
 
vielen dank und gruß
henning

Unter Lenny gab es doch noch

Unter Lenny gab es doch noch gar kein Roundcube. Hast du das manuell installiert?

Bei der Fehlermeldung würde ich mal sagen, dass der SMTP-Server, den du in Roundcube konfiguriert hast, nicht reagiert hat. Da dürfte Dovecot eigentlich nichts mit zu tun haben - außer bei der Authentifizierung vielleicht.

Hallo Christoph, ja, das

Hallo Christoph,

ja, das habe ich manuell installiert. Das Auth Problem hängt aber, so denke ich, nicht an Roundcube.

Denn ich habe das Problem bei dem ersten SMTP telnet Test. Dann ich Thunderbird, dass der SMTP-Server nicht reagiert (Aussage PopUp-Fenster TB). Letzteres bildet dann auch noch Roundcube.

Ebenfalls erhalte ich relay access denied, wenn ich mit auth plain im telnet eine verschlüsselte Verbindung mit dem generierten Buchstaben/Zahlen String herstellen will.

Gruß
Henning

Problems by testing the maildir

Good afternoon,

 

I have some problems by testing via telnet my email connection. I can send a mail. (Receive it via redirection to my personal mailaddy) but don't get the mail in the vmail/domain.de/user/ folder. There are no folder like this.

In my log file are only older entries like the first connection to auth-worker. But when I now stop and start my server there no new entry.
How can I solve these problem?


Thank you very much

Philip

status=bounced (unknown user: "info")

Hi,

When I try to send an mail through telnet, it says in mail.log:

Aug 16 13:53:12 vserver1145 postfix/local[2037]: E4BA3386EC: to=, relay=local, delay=0.01, delays=0.01/0/0/0, dsn=5.1.1, status=bounced (unknown user: "info")

And no mail is in the inbox folder.

The user info is in the virtual_users table!

Your problem is

Your problem is "relay=local". The domain in question is listed as a local domain. That is probably not what you want. See also: http://workaround.org/ispmail/squeeze/postfix-domain-types

._.

I don' really understand what I should do know.

What should I write in main.cf?

Yes

Yes, I read it. And I set mydestination and virtual_mailbox_domains to my domain.

(Yes, i did postfix reload)

But it doesn't work, still the same error

Pages