Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 7th February 2006, 07:05
bluegrass bluegrass is offline
Member
 
Join Date: Jan 2006
Location: Pinas
Posts: 51
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via Yahoo to bluegrass
Default Another Problem: Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP

Hi there!

I guess I have to consult you guys/gals out there about this problem of mine.

I have setup a new mailserver using the procedure mentioned.

After installation, I tried the configuration by sending an email to a new virtual mail account (based from: http://workaround.org/articles/ispmail-sarge/), it was on my understanding that a mailbox will be automatically created once a first mail succeeds. But, after I sent a test mail using telnet and checked whether my /home/vmail/ have a new folder with the virtual mail users account, there is none.

Here's some details on my network configuration: (xxx.edu.ph - my domain)
- I have an existing DNS, Web, FTP, Telnet, Mail Server running on Fedora 2 on a public ip - 203.177.73.xxx (A)
- On the said Server the MX and A record for mail.xxx.edu.ph are pointed to same ip (A) address.
- I setup a new mail server with a private ip of - 192.168.0.xx (b), this new mail server resides behind a Fortinet Fortigate Anti-Virus/Anti-Spam Hardware, wherein I configured its external port on a public ip - 203.177.73.yyy (B). On my new mail server I also used the same domain name, xxx.edu.ph. Then I changed the MX and A record on my DNS Server to point to the new ip address (B).
- For the virtual mail users on the new Mail server, I inserted my existing email address, me@xxx.edu.ph, there is no system user with this username. I then tried the telnet test mail but there is no 'me@xxx.edu.ph' folder on my /home/vmail.
- I checked and double checked the scripts and procedures stated on the tutorial but I don't seem to find where I could have possibly missed.

Attached herewith are some of the files I created based from the tutorial and also the mail.log:


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

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

myhostname = debbie.xxx.edu.ph
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = debbie.xxx.edu.ph, localhost, localhost.localdomain
relayhost =
mynetworks = 127.0.0.0/8
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
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
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_use_tls = yes
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
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


mysql-virtual_domains.cf:
user = mail_admin
password = mypassword
dbname = mail
table = domains
select_field = 'virtual'
where_field = domain
hosts = 127.0.0.1

mysql-virtual_email2email.cf:
user = mail_admin
password = mypassword
dbname = mail
table = users
select_field = email
where_field = email
hosts = 127.0.0.1

mysql-virtual_forwardings.cf:
user = mail_admin
password = mypassword
dbname = mail
table = forwardings
select_field = destination
where_field = source
hosts = 127.0.0.1

mysql-virtual_mailbox_limit.maps.cf:
user = mail_admin
password = mypassword
dbname = mail
table = users
select_field = quota
where_field = email
hosts = 127.0.0.1

mysql-virtual_mailboxes.cf:
user = mail_admin
password = mypassword
dbname = mail
table = users
select_field = CONCAT(SUBSTRING_INDEX(email,'@',-1)
where_field = email
hosts = 127.0.0.1

mysql-virtual_transports.cf:
user = mail_admin
password = mypassword
dbname = mail
table = transport
select_field = transport
where_field = domain
hosts = 127.0.0.1


part of /var/log/mail.log
Feb 6 13:25:48 debbie postfix/qmgr[1311]: EE4F72C2A6A: from=<vonxt@hotmail.com>, size=23758, nrcpt=1 (queue active)
Feb 6 13:25:48 debbie postfix/qmgr[1311]: 33FD92C2A6B: from=<vonxt@hotmail.com>, size=23761, nrcpt=1 (queue active)
Feb 6 13:25:48 debbie postfix/qmgr[1311]: 24D0E2C2A68: from=<vonxt@hotmail.com>, size=23788, nrcpt=1 (queue active)
Feb 6 13:25:48 debbie postfix/proxymap[2464]: warning: mysql query failed: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'from users where email = 'me@xxx.edu.ph'' at line 1
Feb 6 13:25:48 debbie postfix/virtual[3080]: EE4F72C2A6A: to=<me@xxx.edu.ph>, relay=virtual, delay=15239, status=deferred (virtual_mailbox_maps: lookup me@xxx.edu.ph: Success)
Feb 6 13:25:48 debbie postfix/virtual[3080]: 33FD92C2A6B: to=<me@xxx.edu.ph>, relay=virtual, delay=15191, status=deferred (virtual_mailbox_maps: lookup me@xxx.edu.ph: Success)
Feb 6 13:25:48 debbie postfix/virtual[3080]: 24D0E2C2A68: to=<me@xxx.edu.ph>, relay=virtual, delay=15175, status=deferred (virtual_mailbox_maps: lookup me@xxx.edu.ph: Success)

--If you can also help me on the error given by postfix/proxymap (log #4)

Reply With Quote
Sponsored Links
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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 22:45
Virtual Users + Domains With Postfix, Courier + MySQL (+SMTP-AUTH, SpamA, ClamAV) brianwc HOWTO-Related Questions 6 9th May 2007 03:44
Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota, SpamAs Rocky Installation/Configuration 24 9th February 2006 12:08
Backup the Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Qu rogierbanis HOWTO-Related Questions 1 13th January 2006 10:34
Virtual Users And Domains With Postfix, Courier And MySQL: POP/IMAP authentication SeanG HOWTO-Related Questions 3 1st January 2006 18:08


All times are GMT +2. The time now is 05:57.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.