PDA

View Full Version : Courier : can't create directories in home/vmail


kiladila
20th February 2009, 01:48
I have a little problem whis this tutorial:
http://www.howtoforge.com/virtual-users-domains-postfix-courier-mysql-squirrelmail-ubuntu8.04-p5#comment-5671

Postfix seams to be fine but courier cant create directories in home/vmail
and i cant receive emails and of corse login via squirrelmail.

No records in error logs...

I searched solution in this forum but no results...Can somebody help deal whis this?

falko
20th February 2009, 19:40
Did you send a welcome email to the account before you logged in?

kiladila
20th February 2009, 21:38
Yes i sent welcome msg and no directory was created in home/vmail

falko
21st February 2009, 19:17
What's in your mail log when you send a welcome message?

kiladila
21st February 2009, 23:45
Ok this is mail.log when i sent test email via mailx:

Feb 21 23:43:47 softas postfix/pickup[19457]: D0E5295C37F: uid=0 from=<root>
Feb 21 23:43:47 softas postfix/cleanup[23541]: D0E5295C37F: message-id=<20090221214347.D0E5295C37F@softas.lt>
Feb 21 23:43:47 softas postfix/qmgr[5001]: D0E5295C37F: from=<root@softas.lt>, size=297, nrcpt=1 (queue active)
Feb 21 23:44:06 softas postfix/smtpd[23552]: connect from localhost.localdomain[127.0.0.1]
Feb 21 23:44:06 softas postfix/smtpd[23552]: D387895C3A0: client=localhost.localdomain[127.0.0.1]
Feb 21 23:44:06 softas postfix/cleanup[23541]: D387895C3A0: message-id=<20090221214347.D0E5295C37F@softas.lt>
Feb 21 23:44:06 softas postfix/qmgr[5001]: D387895C3A0: from=<root@softas.lt>, size=720, nrcpt=1 (queue active)
Feb 21 23:44:06 softas postfix/smtpd[23552]: disconnect from localhost.localdomain[127.0.0.1]
Feb 21 23:44:06 softas amavis[5352]: (05352-18) Passed CLEAN, <root@softas.lt> -> <romka@softas.lt>, Message-ID: <20090221214347.D0E5295C37F@softas.lt>, mail_id: CcCSEXvHQHka, Hits: -0.001, size: 297, queued_as: D387895C3A0, 19001 ms
Feb 21 23:44:06 softas postfix/smtp[23544]: D0E5295C37F: to=<romka@softas.lt>, relay=127.0.0.1[127.0.0.1]:10024, delay=19, delays=0.04/0.01/0/19, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as D387895C3A0)
Feb 21 23:44:06 softas postfix/qmgr[5001]: D0E5295C37F: removed
Feb 21 23:44:06 softas postfix/smtpd[17245]: connect from unknown[192.168.1.1]
Feb 21 23:44:06 softas postfix/smtp[23555]: warning: host mail.softas.lt[84.32.221.19]:25 greeted me with my own hostname softas.lt
Feb 21 23:44:06 softas postfix/smtp[23555]: warning: host mail.softas.lt[84.32.221.19]:25 replied to HELO/EHLO with my own hostname softas.lt
Feb 21 23:44:06 softas postfix/smtp[23555]: D387895C3A0: to=<romka@softas.lt>, relay=mail.softas.lt[84.32.221.19]:25, delay=0.04, delays=0.01/0.01/0.02/0, dsn=5.4.6, status=bounced (mail for mail.softas.lt loops back to myself)
Feb 21 23:44:06 softas postfix/smtpd[17245]: disconnect from unknown[192.168.1.1]
Feb 21 23:44:06 softas postfix/cleanup[23541]: E939995C3AB: message-id=<20090221214406.E939995C3AB@softas.lt>
Feb 21 23:44:06 softas postfix/qmgr[5001]: E939995C3AB: from=<>, size=2482, nrcpt=1 (queue active)
Feb 21 23:44:06 softas postfix/bounce[23557]: D387895C3A0: sender non-delivery notification: E939995C3AB
Feb 21 23:44:06 softas postfix/qmgr[5001]: D387895C3A0: removed

falko
22nd February 2009, 21:27
Please add mail.softas.lt to the mydestination line in main.cf and restart Postfix.

kiladila
22nd February 2009, 22:07
Sorry no results...This is mail.log

Feb 22 22:01:23 softas postfix/smtpd[24859]: connect from localhost.localdomain[127.0.0.1]
Feb 22 22:01:23 softas postfix/smtpd[24859]: disconnect from localhost.localdomain[127.0.0.1]
Feb 22 22:02:23 softas postfix/smtpd[24859]: connect from localhost.localdomain[127.0.0.1]
Feb 22 22:02:23 softas postfix/smtpd[24859]: disconnect from localhost.localdomain[127.0.0.1]
Feb 22 22:02:52 softas postfix/smtpd[24859]: connect from fg-out-1718.google.com[72.14.220.156]
Feb 22 22:02:52 softas postfix/smtpd[24859]: 9B8A695C54C: client=fg-out-1718.google.com[72.14.220.156]
Feb 22 22:02:52 softas postfix/cleanup[24893]: 9B8A695C54C: message-id=<e583083e0902221202m6483cb4fld77fd4f77f5bad8c@mail. gmail.com>
Feb 22 22:02:52 softas postfix/qmgr[24843]: 9B8A695C54C: from=<kiladila@gmail.com>, size=1953, nrcpt=1 (queue active)
Feb 22 22:02:55 softas postfix/smtpd[24900]: connect from localhost.localdomain[127.0.0.1]
Feb 22 22:02:55 softas postfix/smtpd[24900]: 6D71D95C550: client=localhost.localdomain[127.0.0.1]
Feb 22 22:02:55 softas postfix/cleanup[24893]: 6D71D95C550: message-id=<e583083e0902221202m6483cb4fld77fd4f77f5bad8c@mail. gmail.com>
Feb 22 22:02:55 softas postfix/qmgr[24843]: 6D71D95C550: from=<kiladila@gmail.com>, size=2386, nrcpt=1 (queue active)
Feb 22 22:02:55 softas postfix/smtpd[24900]: disconnect from localhost.localdomain[127.0.0.1]
Feb 22 22:02:55 softas amavis[26907]: (26907-14) Passed CLEAN, [72.14.220.156] [72.14.220.156] <kiladila@gmail.com> -> <romka@softas.lt>, Message-ID: <e583083e0902221202m6483cb4fld77fd4f77f5bad8c@mail. gmail.com>, mail_id: FDblyuiAJ3ma, Hits: 0.152, size: 1953, queued_as: 6D71D95C550, 2732 ms
Feb 22 22:02:55 softas postfix/smtp[24894]: 9B8A695C54C: to=<romka@softas.lt>, relay=127.0.0.1[127.0.0.1]:10024, delay=2.9, delays=0.16/0.01/0/2.7, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 6D71D95C550)
Feb 22 22:02:55 softas postfix/qmgr[24843]: 9B8A695C54C: removed
Feb 22 22:02:55 softas postfix/smtpd[24902]: connect from unknown[192.168.1.1]
Feb 22 22:02:55 softas postfix/smtp[24901]: warning: host mail.softas.lt[84.32.221.19]:25 greeted me with my own hostname mail.softas.lt
Feb 22 22:02:55 softas postfix/smtp[24901]: warning: host mail.softas.lt[84.32.221.19]:25 replied to HELO/EHLO with my own hostname mail.softas.lt
Feb 22 22:02:55 softas postfix/smtp[24901]: 6D71D95C550: to=<romka@softas.lt>, relay=mail.softas.lt[84.32.221.19]:25, delay=0.07, delays=0.03/0.02/0.02/0, dsn=5.4.6, status=bounced (mail for mail.softas.lt loops back to myself)
Feb 22 22:02:55 softas postfix/smtpd[24902]: disconnect from unknown[192.168.1.1]
Feb 22 22:02:55 softas postfix/cleanup[24893]: 829C795C552: message-id=<20090222200255.829C795C552@mail.softas.lt>
Feb 22 22:02:55 softas postfix/qmgr[24843]: 829C795C552: from=<>, size=4206, nrcpt=1 (queue active)
Feb 22 22:02:55 softas postfix/bounce[24903]: 6D71D95C550: sender non-delivery notification: 829C795C552
Feb 22 22:02:55 softas postfix/qmgr[24843]: 6D71D95C550: removed
Feb 22 22:02:56 softas postfix/smtp[24901]: 829C795C552: to=<kiladila@gmail.com>, relay=gmail-smtp-in.l.google.com[209.85.218.66]:25, delay=1.1, delays=0.02/0/0.41/0.69, dsn=2.0.0, status=sent (250 2.0.0 OK 1235332976 22si4925017bwz.86)
Feb 22 22:02:56 softas postfix/qmgr[24843]: 829C795C552: removed

And this is main.cf

# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# 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
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = mail.softas.lt
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = localhost, localhost.localdomain, mail.softas.lt
relayhost =
mynetworks = 127.0.0.0/8
mailbox_command =
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_mailbox_base = /home/vmail
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = "The user you are trying to reach is over quota."
virtual_overquota_bounce = yes
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
content_filter = amavis:[127.0.0.1]:10024
receive_override_options = no_address_mappings
local_recipient_maps = $alias_maps $virtual_mailbox_maps unix:passwd.byname
home_mailbox = Maildir/
#home_mailbox = /home/vmail

falko
23rd February 2009, 19:51
Did you restart Postfix?

kiladila
23rd February 2009, 23:54
YES :) i restarted all server...and nothing...loops back to myself
I have no idea what to do now...

falko
24th February 2009, 20:53
Does this happen when you send to a specific email address, or for all email addresses that you send an email?

kiladila
28th February 2009, 20:51
Ok this problem is killing me now...
It happens with all vmail's i creat. Step by step instaliation was fine, no errors or somethik. Sending E-mail is OK but i cant receive any email from internet, no users folders are creating in home/vmail.

Now when i sending something to some one from virtual users i got:

connect from fg-out-1718.google.com[72.14.220.154]
postfix/smtpd[2238]: NOQUEUE: reject: RCPT from fg-out-1718.google.com[72.14.220.154]: 554 5.7.1 <info@softas.lt>: Relay access denied; from=<kiladila@gmail.com> to=<info@softas.lt> proto=ESMTP helo=<fg-out-1718.google.com>
postfix/smtpd[2238]: disconnect from fg-out-1718.google.com[72.14.220.154]

My main.cf

# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# 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
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = mail.softas.lt
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = localhost, localhost.localdomain, mail.softas.lt
relayhost =
mynetworks = 127.0.0.0/8
mailbox_command =
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_mailbox_base = /home/vmail
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = "The user you are trying to reach is over quota."
virtual_overquota_bounce = yes
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
content_filter = amavis:[127.0.0.1]:10024
receive_override_options = no_address_mappings
local_recipient_maps = $alias_maps $virtual_mailbox_maps unix:passwd.byname
home_mailbox = Maildir/
#home_mailbox = /home/vmail

Yes i restarted all deamons, i double checked tutorial but nothing...

SENDING - OK
RECEIVING - Relay access denied

kiladila
1st March 2009, 00:04
Ok i have some news...i manualy created all needed directories now i can login via email klients but still no email comes "loop back to my self"....When i try to log in to squiremail it says" ERROR: Connection dropped by IMAP server.

warning: host softas.lt[84.32.221.19]:25 greeted me with my own hostname softas.lt
warning: host softas.lt[84.32.221.19]:25 replied to HELO/EHLO with my own hostname softas.lt

falko
1st March 2009, 15:37
Add the domain/hostname that is mentioned in the "loop back to my self" error to mydestination in main.cf and restart Postfix.

clark61
20th March 2009, 14:28
Hi all an sorry for my english,
I have same problem and I have follow line by line the http://www.howtoforge.com/virtual-users-domains-postfix-courier-mysql-squirrelmail-debian-lenny, when I send the mail to welcome my syslog say :

adelaide:/home# Mar 20 13:17:01 adelaide /USR/SBIN/CRON[3360]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Mar 20 13:17:13 adelaide postfix/pickup[3323]: BE0FA12054D: uid=0 from=<root>
Mar 20 13:17:13 adelaide postfix/cleanup[3365]: BE0FA12054D: message-id=<20090320121713.BE0FA12054D@adelaide.mydomain.com>
Mar 20 13:17:13 adelaide postfix/qmgr[3075]: BE0FA12054D: from=<root@adelaide.mydomain.com>, size=329, nrcpt=1 (queue active)
Mar 20 13:17:16 adelaide postfix/smtpd[3373]: connect from localhost[127.0.0.1]
Mar 20 13:17:16 adelaide postfix/trivial-rewrite[3367]: warning: do not list domain adelaide.maydomain.com in BOTH mydestination and virtual_mailbox_domains
Mar 20 13:17:16 adelaide postfix/trivial-rewrite[3367]: warning: do not list domain adelaide.mydomain.com in BOTH mydestination and virtual_mailbox_domains
Mar 20 13:17:16 adelaide postfix/smtpd[3373]: DBEC712052D: client=localhost[127.0.0.1]
Mar 20 13:17:16 adelaide postfix/cleanup[3365]: DBEC712052D: message-id=<20090320121713.BE0FA12054D@adelaide.mydomain.com>
Mar 20 13:17:16 adelaide postfix/qmgr[3075]: DBEC712052D: from=<root@adelaide.domain.com>, size=800, nrcpt=1 (queue active)
Mar 20 13:17:16 adelaide postfix/trivial-rewrite[3367]: warning: do not list domain adelaide.mydomain.com in BOTH mydestination and virtual_mailbox_domains
Mar 20 13:17:16 adelaide postfix/smtpd[3373]: disconnect from localhost[127.0.0.1]
Mar 20 13:17:16 adelaide amavis[2768]: (02768-03) Passed CLEAN, <root@adelaide.mydomain.com> -> <clark@adelaide.mydomain.com>, Message-ID: <20090320121713.BE0FA12054D@adelaide.mydomain.com>, mail_id: 6i9HGAz1VUHh, Hits: 0.096, size: 329, queued_as: DBEC712052D, 3128 ms
Mar 20 13:17:16 adelaide postfix/smtp[3368]: BE0FA12054D: to=<clark@adelaide.mydomain.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=3.2, delays=0.05/0.01/0.01/3.1, dsn=2.0.0, status=sent (250 2.0.0 Ok, id=02768-03, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as DBEC712052D)
Mar 20 13:17:16 adelaide postfix/qmgr[3075]: BE0FA12054D: removed
Mar 20 13:17:16 adelaide postfix/local[3374]: DBEC712052D: to=<clark@adelaide.mydomain.com>, relay=local, delay=0.07, delays=0.02/0.01/0/0.04, dsn=5.1.1, status=bounced (unknown user: "clark")
Mar 20 13:17:16 adelaide postfix/cleanup[3365]: EC53A12054E: message-id=<20090320121716.EC53A12054E@adelaide.mydomain.com>
Mar 20 13:17:16 adelaide postfix/qmgr[3075]: EC53A12054E: from=<>, size=2666, nrcpt=1 (queue active)
Mar 20 13:17:16 adelaide postfix/trivial-rewrite[3367]: warning: do not list domain adelaide.mydomain.com in BOTH mydestination and virtual_mailbox_domains
Mar 20 13:17:16 adelaide postfix/cleanup[3365]: EEF9512054F: message-id=<20090320121716.EC53A12054E@adelaide.mydomain.com>
Mar 20 13:17:16 adelaide postfix/bounce[3375]: DBEC712052D: sender non-delivery notification: EC53A12054E
Mar 20 13:17:16 adelaide postfix/qmgr[3075]: DBEC712052D: removed
Mar 20 13:17:16 adelaide postfix/qmgr[3075]: EEF9512054F: from=<>, size=2806, nrcpt=1 (queue active)
Mar 20 13:17:16 adelaide postfix/local[3374]: EC53A12054E: to=<root@adelaide.mydomain.com>, relay=local, delay=0.02, delays=0.01/0/0/0.01, dsn=2.0.0, status=sent (forwarded as EEF9512054F)
Mar 20 13:17:16 adelaide postfix/qmgr[3075]: EC53A12054E: removed
Mar 20 13:17:17 adelaide postfix/smtp[3376]: EEF9512054F: to=<postmaster@mydomain.com>, orig_to=<root@adelaide.mydomain.com>, relay=webmail.mydomain.com[194.243.250.20]:25, delay=0.29, delays=0/0.01/0.02/0.25, dsn=5.1.1, status=bounced (host webmail.mydomain.com[194.243.250.20] said: 550 5.1.1 <postmaster@mydomain.com> User unknown; rejecting (in reply to RCPT TO command))
Mar 20 13:17:17 adelaide postfix/qmgr[3075]: EEF9512054F: removed
and the same for different user.
I have put domain adelaide.mydodomain.com in mail db by means command line and same for the user clark and sandy, but courier don't create the directory and if i try to connect with squirrel have in syslog:
adelaide:/home# Mar 20 13:25:41 adelaide imapd: Connection, ip=[::ffff:127.0.0.1]
Mar 20 13:25:41 adelaide imapd: chdir adelaide.endoxa.com/clark/: No such file or directory
and on squirrel :
ERROR: Connection dropped by IMAP server.
Can anyone give me a right way to follow?
Many thanks in advance

falko
21st March 2009, 21:33
Mar 20 13:17:16 adelaide postfix/trivial-rewrite[3367]: warning: do not list domain adelaide.mydomain.com in BOTH mydestination and virtual_mailbox_domainsYou've put adelaide.mydomain.com in mydestination (in main.cf) and in the database. If you want to use it in the database, you can't use it in mydestination. You might have to change your hostname.

jokn00
22nd March 2009, 06:11
I have a similar problem, but with the debian version of the how-to.

http://howtoforge.com/virtual-users-domains-postfix-courier-mysql-squirrelmail-debian-lenny

I followed the tutorial with no problems and everything seemed to be okay but then when I went to test send / receive mail I ran into problems. Per instructions in the tutorial the vmail boxes were supposed to be created automatically when a mail was sent to them. I used mailx as instructed, but this did not create the directories. I tried sending a mail from an outside account, I get a bounce back stating 'relay access denied'. Here's my main.cf and the output of my mail.log when I used mailx to send a test. I've edited the domain names from the configs for privacy reasons. What am I overlooking here?

EDIT: I tried this with a second domain after reading the above post, the 2nd domain ex: user@domain2.com works fine after I sent a mail using mailx. The domain I used for my hostname in /etc/hosts is the same domain I used for mydestination in /etc/postfix/main.cf. I changed my hostname and main.cf and restarted postfix. It's still not creating the mailbox in /home/vmail. The messages are still bouncing.


Mar 22 04:01:35 li34-68 postfix/pickup[532]: 3200F104FE: uid=0 from=<root>
Mar 22 04:01:35 li34-68 postfix/cleanup[701]: 3200F104FE: message-id=<20090322040135.3200F104FE@mail.domain.com>
Mar 22 04:01:35 li34-68 postfix/qmgr[531]: 3200F104FE: from=<root@mail.domain.com>, size=329, nrcpt=1 (queue active)
Mar 22 04:01:36 li34-68 postfix/smtpd[710]: connect from localhost.localdomain[127.0.0.1]
Mar 22 04:01:36 li34-68 postfix/smtpd[710]: 8FB3A104ED: client=localhost.localdomain[127.0.0.1]
Mar 22 04:01:36 li34-68 postfix/cleanup[701]: 8FB3A104ED: message-id=<20090322040135.3200F104FE@mail.domain.com>
Mar 22 04:01:36 li34-68 postfix/qmgr[531]: 8FB3A104ED: from=<root@mail.domain.com>, size=805, nrcpt=1 (queue active)
Mar 22 04:01:36 li34-68 postfix/smtpd[710]: disconnect from localhost.localdomain[127.0.0.1]
Mar 22 04:01:36 li34-68 amavis[32254]: (32254-02) Passed CLEAN, <root@mail.domain.com> -> <exuser@domain.com>, Message-ID: <20090322040135.3200F104FE@mail.domain.com>, mail_id: dBPg9Ol2JbtZ, Hits: 0.482, size: 329, queued_as: 8FB3A104ED, 1409 ms
Mar 22 04:01:36 li34-68 postfix/smtp[705]: 3200F104FE: to=<exuser@domain.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=1.4, delays=0.02/0/0/1.4, dsn=2.0.0, status=sent (250 2.0.0 Ok, id=32254-02, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 8FB3A104ED)
Mar 22 04:01:36 li34-68 postfix/qmgr[531]: 3200F104FE: removed
Mar 22 04:01:36 li34-68 postfix/smtp[711]: 8FB3A104ED: to=<exuser@domain.com>, relay=none, delay=0.04, delays=0.04/0.01/0/0, dsn=5.4.6, status=bounced (mail for domain.com loops back to myself)
Mar 22 04:01:36 li34-68 postfix/cleanup[701]: B3ACF104FF: message-id=<20090322040136.B3ACF104FF@mail.domain.com>
Mar 22 04:01:36 li34-68 postfix/qmgr[531]: B3ACF104FF: from=<>, size=2708, nrcpt=1 (queue active)
Mar 22 04:01:36 li34-68 postfix/bounce[712]: 8FB3A104ED: sender non-delivery notification: B3ACF104FF
Mar 22 04:01:36 li34-68 postfix/qmgr[531]: 8FB3A104ED: removed
Mar 22 04:01:36 li34-68 postfix/cleanup[701]: CCBE8104ED: message-id=<20090322040136.B3ACF104FF@mail.domain.com>
Mar 22 04:01:36 li34-68 postfix/qmgr[531]: CCBE8104ED: from=<>, size=2849, nrcpt=1 (queue active)
Mar 22 04:01:36 li34-68 postfix/local[713]: B3ACF104FF: to=<root@mail.domain.com>, relay=local, delay=0.16, delays=0.1/0.01/0/0.05, dsn=2.0.0, status=sent (forwarded as CCBE8104ED)
Mar 22 04:01:36 li34-68 postfix/qmgr[531]: B3ACF104FF: removed
Mar 22 04:01:36 li34-68 postfix/smtp[711]: CCBE8104ED: to=<postmaster@domain.com>, orig_to=<root@mail.domain.com>, relay=none, delay=0.05, delays=0.05/0/0/0, dsn=5.4.6, status=bounced (mail for domain.com loops back to myself)
Mar 22 04:01:36 li34-68 postfix/qmgr[531]: CCBE8104ED: removed


This is my /etc/postfix/main.cf

# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# 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

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = /usr/share/doc/postfix

# TLS parameters
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = mail.domain.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = mail.domain.com, localhost, localhost.localdomain
relayhost =
mynetworks = 127.0.0.0/8
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
html_directory = /usr/share/doc/postfix/html
message_size_limit = 30720000
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_mailbox_base = /home/vmail
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
virtual_create_maildirsize = yes
virtual_maildir_extended = yes
virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = "The user you are trying to reach is over quota."
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
content_filter = amavis:[127.0.0.1]:10024
receive_override_options = no_address_mappings

falko
22nd March 2009, 16:33
Mar 22 04:01:36 li34-68 postfix/smtp[711]: 8FB3A104ED: to=<exuser@domain.com>, relay=none, delay=0.04, delays=0.04/0.01/0/0, dsn=5.4.6, status=bounced (mail for domain.com loops back to myself)
Is domain.com listed in the domains table?

jokn00
22nd March 2009, 19:44
Is domain.com listed in the domains table?


Alright, I put the wrong domain in the domains table.... I took a look at it once and saw it was there, then realized it was only domain2.com that was in the table. I need more caffeine.... everything is working again, I think. Thanks for the help.

clark61
23rd March 2009, 15:40
You've put adelaide.mydomain.com in mydestination (in main.cf) and in the database. If you want to use it in the database, you can't use it in mydestination. You might have to change your hostname.

but if I put another domain like sidney.mydomain.com in db and try tio connect or send a mail at address example@sidney.mydomain.com the directory /home/vmail/sidney.mydomain.com/example don't is create by courier and imap connecction is not avaible an I have same error messages:

adelaide:/home/vmail# Mar 23 14:11:09 adelaide imapd: Connection, ip=[::ffff:127.0.0.1]
Mar 23 14:11:09 adelaide imapd: chdir sidney.mydomain.com/clark/: No such file or directory
and web squirrel:
ERROR: Connection dropped by IMAP server.

clark61
23rd March 2009, 16:52
Hi all
I have rewritten over the main.cf and now it works.
The curious thing is that the file is identical to the previous one.
Many thank falko and my compliments for the Howto

clark61
25th March 2009, 10:40
Hi all,
one other question.
There is perhaps a webmin module or something similar to the task of creating the domain and email boxes?
I tried postfixadmin but actually creates more problems than it solves.
The server will be 'run by people who have little confidence with the command line.
Thanks in advance.
Sorry for my english

falko
26th March 2009, 18:13
I don't know of such a web interface.
Postfixadmin uses a slightly different database structure, so it won't work with my tutorial.