
15th January 2006, 06:38
|
|
Junior Member
|
|
Join Date: Jan 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota, SpamAs
I just finished running through Falko's Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota, SpamAssassin, ClamAV) tutorial which was very straight forward. Unfortunately I still haven't been able to get everything to work.
My current problem is that rather than saving email messages in the /home/vmail directory they're being saved in the user's home directory... which won't be very useful for my other domains.
I'm also not able to successfully connect via the pop connection:
link:/var/log# telnet localhost pop3
Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.
+OK Hello there.
user skluz@xactlydev.com
+OK Password required.
pass myTempPass
-ERR Maildir: No such file or directory
Connection closed by foreign host.
link:/var/log#
Any Ideas?
I searched through all the previous threads and didn't find any that had this exact problem... If I did miss a thread I apologize in advance.
Thanks for any help you can give.
Skluz
Last edited by skluz; 15th January 2006 at 06:41.
|

15th January 2006, 12:43
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,888
Thanks: 693
Thanked 4,188 Times in 3,205 Posts
|
|
The pop3 error occures because you had not send an email successfully to the vmail user yet.
Did your vmail users have the same username then real system users? Try to make a vmail users with a name that does not correspond to a system user.
|

15th January 2006, 18:22
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,665
Thanks: 1,896
Thanked 2,592 Times in 2,443 Posts
|
|
Please compare your configuration files with the ones from the tutorial. Maybe you made a typo somewhere. Also take care about the format of the configuration files (whitespaces, tabs, ...), especially Courier is very finicky about this.
|

15th January 2006, 18:48
|
|
Junior Member
|
|
Join Date: Jan 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Tutorial redo
I have run through the tutorial 3 times to make sure that I don't have any typos... I did find a few whitespaces on the end of the /etc/postfix/main.cf file after ='s without trailing information. Unfortunately it doesn't seem to have changed anything. I had heard that this was important in the /etc/courier/authmysqlrc file so it had already had all of it's extra whitespace removed.
/etc/courier/authmysqlrc
Code:
MYSQL_SERVER localhost
MYSQL_USERNAME mail_admin
MYSQL_PASSWORD myTempAdminPass
MYSQL_PORT 0
MYSQL_DATABASE mail
MYSQL_USER_TABLE users
MYSQL_CRYPT_PWFIELD password
#MYSQL_CLEAR_PWFIELD password
MYSQL_UID_FIELD 5000
MYSQL_GID_FIELD 5000
MYSQL_LOGIN_FIELD email
MYSQL_HOME_FIELD "/home/vmail"
#MYSQL_MAILDIR_FIELD maildir
MYSQL_MAILDIR_FIELD CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/')
#MYSQL_NAME_FIELD
MYSQL_QUOTA_FIELD quota
/etc/postfix/main.cf
Code:
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
append_dot_mydomain = no
myhostname = xactlydev.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = xactlydev.com, localhost, localhost.localdomain
relayhost =
mynetworks = 127.0.0.0/8
mailbox_command =
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated, reject_unauth_destination
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtpd_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_key_file = /etc/postfix/smtpd.key
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
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
home_mailbox = Maildir/
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, proxy: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_mailbox_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
virtual_maildir_limit_message = "The user you are trying to reach is over quota."
I have also tried sending email to an email user that isn't a system user. It was bounced because the user was "unknown".
Code:
Jan 15 11:45:42 link postfix/smtpd[2339]: connect from localhost.localdomain[127
.0.0.1]
Jan 15 11:45:42 link postfix/smtpd[2339]: 5873C4AF48: client=localhost.localdoma
in[127.0.0.1]
Jan 15 11:45:42 link postfix/cleanup[2329]: 5873C4AF48: message-id=<200601151745
38.A42F44AF45@xactlydev.com>
Jan 15 11:45:42 link postfix/qmgr[2325]: 5873C4AF48: from=<root@xactlydev.com>,
size=743, nrcpt=1 (queue active)
Jan 15 11:45:42 link postfix/smtpd[2339]: disconnect from localhost.localdomain[
127.0.0.1]
Jan 15 11:45:42 link amavis[1574]: (01574-01) Passed, <root@xactlydev.com> -> <b
eth@xactlydev.com>, Message-ID: <20060115174538.A42F44AF45@xactlydev.com>, Hits:
-1.536
Jan 15 11:45:42 link postfix/local[2343]: 5873C4AF48: to=<beth@xactlydev.com>, r
elay=local, delay=0, status=bounced (unknown user: "beth")
Jan 15 11:45:42 link postfix/smtp[2333]: A42F44AF45: to=<beth@xactlydev.com>, re
lay=127.0.0.1[127.0.0.1], delay=4, status=sent (250 2.6.0 Ok, id=01574-01, from
MTA: 250 Ok: queued as 5873C4AF48)
Jan 15 11:45:42 link postfix/qmgr[2325]: A42F44AF45: removed
Jan 15 11:45:42 link postfix/cleanup[2329]: C12864AF4C: message-id=<200601151745
42.C12864AF4C@xactlydev.com>
Jan 15 11:45:42 link postfix/qmgr[2325]: C12864AF4C: from=<>, size=2341, nrcpt=1
(queue active)
Jan 15 11:45:42 link postfix/qmgr[2325]: 5873C4AF48: removed
Jan 15 11:45:42 link postfix/local[2343]: C12864AF4C: to=<root@xactlydev.com>, r
elay=local, delay=0, status=sent (delivered to maildir)
Jan 15 11:45:42 link postfix/qmgr[2325]: C12864AF4C: removed
Last edited by skluz; 15th January 2006 at 18:56.
|

15th January 2006, 22:44
|
|
Junior Member
|
|
Join Date: Jan 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
mysql problem
It turns out that a lot of my problem was with mysql permissions. I was able to add permissions on for %, which seemed to get me past a few problems.
I then manually added the directory structure under /home/vmail in order to allow the users to successfully log into the pop3 connection. So pop3 works.
SMTP still not quite right. I'm still having the problem with the mail delivery. The SMTP system is still using the system accounts rather than the mysql information. There's definitely some disconnect here that I haven't been able to put my finger on yet.
Last edited by skluz; 15th January 2006 at 22:46.
|

15th January 2006, 23:23
|
|
Junior Member
|
|
Join Date: Jan 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Back to the system user
okay...now I'm really confused. Email's are being delivered to the system user account, but the pop checks the virtual directory like it's supposed to.
I tried playing around with the /etc/postfix/main.cf but I'm still not able to get things delivered to the correct location.
|

15th January 2006, 23:35
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 31,888
Thanks: 693
Thanked 4,188 Times in 3,205 Posts
|
|
You still not answered my question:
Did your vmail users have the same username then real system users? Try to make a vmail users with a name that does not correspond to a system user.
|

15th January 2006, 23:37
|
|
Junior Member
|
|
Join Date: Jan 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
sending to non-system users
I've tried sending email to non-system users...and the emails get bounced.
The email then get's forwarded to root's Maildir.
|

16th January 2006, 02:38
|
|
Junior Member
|
|
Join Date: Jan 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
virtual mail...
At one point I had removed my primary domain from the domain mysql table. This was causing the problem.
I've added a virtual domain, and it seems to be working correctly.
So should I removed my primary domain from the main.cf file so that all the domains are virtual?
Basically all emails at xactlydev.com are not working...but my virtual domain, skluz.com, seems to be working fine. VERY ODD...
|

16th January 2006, 02:51
|
|
Junior Member
|
|
Join Date: Jan 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Whhheeewwww
I think I've finally got this thing under wraps.
By removing my primary domain from the mydestination line in the /etc/postfix/main.cf I was able to get everything working as expected. I still haven't figured out the IMAP stuff as I hadn't used it before. Maybe I'll dig around with that this week.
Thanks for all your help. Keep up the great work and the great HOWTOs. I made the switch from SuSE to Debian because of your tutorial, and I'm glad to have another flavor of Linux under my belt.
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Similar Threads
|
| Thread |
Thread Starter |
Forum |
Replies |
Last Post |
|
Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota...
|
killfrog |
HOWTO-Related Questions |
3 |
25th September 2009 21:45 |
|
Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota, SpamAs
|
ruskicar |
HOWTO-Related Questions |
26 |
20th July 2007 16:28 |
|
Backup the Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Qu
|
rogierbanis |
HOWTO-Related Questions |
1 |
13th January 2006 09:34 |
|
Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota, SpamAs
|
amilcar |
HOWTO-Related Questions |
1 |
1st January 2006 17:12 |
|
Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota, SpamAs
|
pontifex |
HOWTO-Related Questions |
2 |
26th October 2005 17:54 |
All times are GMT +2. The time now is 04:59.
|
Recent comments
1 day 2 hours ago
1 day 7 hours ago
1 day 9 hours ago
1 day 9 hours ago
1 day 11 hours ago
1 day 15 hours ago
1 day 16 hours ago
1 day 19 hours ago
2 days 8 hours ago
2 days 9 hours ago