As a followup I tried putting in my main.cf:
relay_domains = mysql:mysql-relay-domains.cf
And as the mysql-relay-domains.cf file:
user = myuser
password = password
dbname = mydb
table = postfix_relaydomains
select_field = domain
where_field = domain
hosts = 10.10.10.10
But no go... it comes up with in the logs:
Dec 30 12:36:18 mybox postfix/smtpd[11223]: fatal: bad string length 0 <
1: mysql-relay-domains.cf_dbname =
Dec 30 12:36:19 mybox postfix/master[11194]: warning: process
/usr/lib/postfix/smtpd pid 11223 exit status 1
Dec 30 12:36:19 mybox postfix/master[11194]: warning:
/usr/lib/postfix/smtpd: bad command startup -- throttling
Erm... Any ideas?
Andy Savage wrote:
Thanks David, but one more thing I need to ask.
I am interested in having everything stored in the database, so I don't
want to store relay_domains in the config file. What would be the
correct way to proxy that to mysql and what would my query look like?
Lets say I have a seperate table called postfix_domains.
You see I am accepting mail for many domains and it makes it much easier
having everything in the database.
Also, can I ask, what is the difference between relay_domains and
virtual_domains?
Kind Regards,
Andy Savage
Niblett, David A wrote:
Andy,
I was on the same path as you. Since you are going to use dbmail lmtp
for delivery I found you need to use relay_domains.
This is what I do:
relay_domains = domain.com
relay_recipient_maps = proxy:pgsql:/sql-configs/postfix-relay-pgsql.cf
relay_transport = dbmail-lmtp:[127.0.0.1]:24
That was all I needed to get everything to work and reject
messages. I HIGHLY suggest you use a 550 to reject the Email.
By using a 450 you are telling the other end that it's a soft
error and to try again later. 550 tells the sender, it
doesn't exist, and to not try again. By doing a 450, you will
just clog up the sender and they will just eat more bandwidth
and CPU hitting you again (most likely every ~15m for 5d).
--
David A. Niblett | email: [EMAIL PROTECTED]
Network Administrator | Phone: (352) 334-3400
Gainesville Regional Utilities | Web: http://www.gru.net/
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Andy Savage
Sent: Thursday, December 29, 2005 7:01 AM
To: [email protected]
Subject: [Dbmail] Postfix & DBMail (Plus Reject messages)
Hey guys
I'm trying to combine DBMail with Postfix and basically I need your
help!
I'm after 3 things as I'm having a few troubles currently and was
wondering if some kind soul on the list could help me out.
I need the main.cf configuration for postfix to allow postfix to check
whether a valid recipient exists in the dbmail database and if it
doens't send a 450 reject message back to the user. I don't want to even
accept mail for unknown users, it just burdens my mailserver.
Currently I have:
------------------main.cf----------------
myhostname = server.domain.tld
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = $myhostname, localhost, localhost.localdomain relayhost
= mynetworks = 127.0.0.0/8 mailbox_command = mailbox_size_limit = 0
recipient_delimiter = + inet_interfaces = all
mydestination = mysql:/etc/postfix/mysql-transport.cf
local_recipient_maps = mysql:/etc/postfix/mysql-localusers.cf
transport_maps = mysql:/etc/postfix/mysql-transport.cf
local_transport = dbmail-lmtp:
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 unknown_local_recipient_reject_code = 450
-----------------------------------------
Kind Regards,
Andy Savage
_______________________________________________
Dbmail mailing list
[email protected] https://mailman.fastxs.nl/mailman/listinfo/dbmail
_______________________________________________
Dbmail mailing list
[email protected]
https://mailman.fastxs.nl/mailman/listinfo/dbmail
_______________________________________________
Dbmail mailing list
[email protected]
https://mailman.fastxs.nl/mailman/listinfo/dbmail