View Full Version : Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota, SpamAs
Rocky
31st January 2006, 19:47
I have sucessfully set up Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota, SpamAssassin, ClamAV) using Debian. However, I have a question.
If I wanted to catch mails coming to domainA and forward them over to my exchange box, do I have to set up the virtual users? I know I have to create the domain and transport entries, which I've already done.:confused:
till
31st January 2006, 20:02
If you forward the emails with a transport to your exchange server, you dont have to create the virtual users. Or did you get any errors?
Rocky
31st January 2006, 20:30
Below is how my system is configure:
1- I have entered damainA into the domain table.
2- I have entered domainA --> smtp:[192.168.x.x] into the transport table.
Now when I try to send mails to someone@domainA.com, it rejects saying Permanent Failure:
550_<malli@domainA.com>:_Recipient_address_rejected:_User_unknown_in_virt ual_m
ailbox_table
till
31st January 2006, 20:47
Please try and remove the domain in the domain table.
Rocky
31st January 2006, 20:53
I removed the domain and now I'm getting the following error:
Permanent Failure: 554_<malli@domainA.com>:_Relay_access_denied
till
31st January 2006, 21:03
Did you issue a:
postfix reload
after you inserted the transport?
Rocky
31st January 2006, 21:22
I confiigured the transport table with the following:
domainA.com ---> smtp:[192.168.x.x]
Then I issued the following command:
postfix reload.
Below is what I have in my /var/log/mail.log file after issuing the postfix reload command:
Jan 31 15:22:27 server1 postfix/smtpd[16393]: connect from rwcrmhc11.comcast.net[204.127.192.81]
Jan 31 15:22:27 server1 postfix/smtpd[16393]: NOQUEUE: reject: RCPT from rwcrmhc11.comcast.net[204.127.192.81]: 554 <malli@mc
rirents.com>: Relay access denied; from=<roc1479@comcast.net> to=<malli@mcrirents.com> proto=ESMTP helo=<rwcrmhc11.comcast.ne
t>
Jan 31 15:22:29 server1 postfix/smtpd[16393]: disconnect from rwcrmhc11.comcast.net[204.127.192.81]
I would like to use it to filter the emails for spam and viruses for 2 domains only.
falko
2nd February 2006, 12:43
You must have the domain in the domain table, and then you must put your transport in the transport table. Please restart Postfix after the change to the transport table.
Rocky
2nd February 2006, 13:34
When I do that, I get the following error:
Permanent Failure: 550_<malli@domainA.com>:_Recipient_address_rejected:_User_unknown_in_virt ual_mailbox_table
Any suggestions?
falko
2nd February 2006, 18:55
What does /etc/postfix/main.cf look like?
Rocky
2nd February 2006, 19:21
My main.cf looks like this:
# 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 = server1.mcrirents.org
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = server1.mcrirents.org, 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_email2emai
l.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 $virt
ual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $re
located_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
content_filter = amavis:[127.0.0.1]:10024
receive_override_options = no_address_mappings
falko
2nd February 2006, 21:58
Ok, I guess these linebreaks are only in this forum, not in your file:
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virt
ual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $re
located_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
What's in /etc/postfix/mysql-virtual_transports.cf?
Also, can you try to comment out receive_override_options = no_address_mappings in /etc/postfix/main.cf and restart Postfix?
Rocky
2nd February 2006, 22:35
My mysql-virtual_transports.cf looks like this:
user = mail_admin
password = xxxxxxx
dbname = mail
table = transport
select_field = transport
where_field = domain
hosts = 127.0.0.1
I tried to comment out 'receive_override_options = no_address_mappings' but received the following:
Permanent Failure: 550_<malli@mcrirents.com>:_Recipient_address_rejected:_User_unknown_in_virt ual_mailbox_table
falko
2nd February 2006, 23:46
Can you double-check all your configuration files and compare them with the ones from the tutorial? Maybe you have a typo or something like this somewhere...
Rocky
3rd February 2006, 02:13
I've compared my 6 config files and all seems correct. I did copy and paste the config information. I don't know what else could be wrong.
Rocky
7th February 2006, 02:28
Would it be better for me just to create all the mail users manually? Also, how do I lower the lever of spam identification?
falko
7th February 2006, 09:54
Would it be better for me just to create all the mail users manually?
You mean on the command line, without tools as phpMyAdmin? That makes no difference.
Also, how do I lower the lever of spam identification?
You can change that in the amavisd configuration file /etc/amavisd.conf, towards the end. Restart amavisd afterwards.
Rocky
8th February 2006, 02:40
What i meant was since the virtual setup is not allowing mails to pass through without the users being created, should i create the users or would it be better to try a re-install?
My setup is as follows:
Hosting domain is domainC
I have domainA entered in the domian table
I have smtp:[192.168.0.xx] entered in the transport table
If i didn't create the virtual users, shouldn't the server catch mails going to domainA and pass it over to my exchange? Or does it only work if the users are added to the virtual table?
falko
8th February 2006, 10:56
The transports worked for me without users being created...
Rocky
8th February 2006, 19:50
Falko I know that I'm being a pain about this setup but I really would like to implement this in my organizaton.
I reloaded the server and tried the following config:
Domain = domainA
Transport = domainA -> smtp:[192.168.0.xx]
This produced the error, the user does not exist in the virtual user table.
I then tried:
Domain = domainA
Transport = domainA -> smtp:[192.168.0.xx]
Forwarding = @domainA -> @domainA
This config allowed mails to be filtered and passed to my exchange without creating the users.:confused:
I checked my confiuration thorougly and every setting/configuraton seems correct. The question is, would my second configuration work without causing any problems?
I will eventually be filtering mails for domainA and domainB which will then be routed to my exchange server through the transport.
I was able to figure out how to change the spamassassin level check, thanks to you.
falko
8th February 2006, 22:25
I then tried:
Domain = domainA
Transport = domainA -> smtp:[192.168.0.xx]
Forwarding = @domainA -> @domainA
This config allowed mails to be filtered and passed to my exchange without creating the users.:confused:
I checked my confiuration thorougly and every setting/configuraton seems correct. The question is, would my second configuration work without causing any problems?
I don't see any problems...
It's really strange that it doesn't work for... I have no idea what could be the reason... :confused:
Rocky
8th February 2006, 22:52
Having a problem sending zip files as attachments. I don't get any errors and the mail never goes through. However, i think that clamav is putting them in the quarantine folder.
Any idea how to fix this?
falko
9th February 2006, 00:45
Having a problem sending zip files as attachments. I don't get any errors and the mail never goes through. However, i think that clamav is putting them in the quarantine folder.
Have you checked the quarantine folder?
Rocky
9th February 2006, 01:44
I've checked /var/lib/amavis/virusmails and found about 13 mails. However, each mail has a very long name and starts with spam- and ends with .gz. How would I get them to pass through the filter? They all have a zip file attached to them. I was able to get .doc, .xls, .pdf, .txt files to pass through. I'm just stuck trying to get .zip to pass through.
falko
9th February 2006, 11:08
Do you have zip and unzip installed on your system?
vBulletin® v3.8.7, Copyright ©2000-2012, vBulletin Solutions, Inc.