M. J. [Mike] O'Brien wrote:

Hey Ryan:
You can test this in a flash with this:
postmap -q somedomain.tld mysql:/usr/local/etc/postfix/mydestination.cf


#1: You are using the wrong mysql.cf syntax for the version of postfix you are running. "query=" is for 2.2 and 2.3 (old way is deprecated in 2.3) but for 2.1 and older you do it the old way without the query. See it explained in the Help file. (pasted below too :o)

#2: The syntax in main.cf is wrong for ANY version but from your log it looks like its working anyway. Go figure :o)

#3: You sure are gung ho, Ryan, **nice work** but you should take a breath, have a coffee and read some stuff :o)

Coffee It is 3am man what are you crazy ha vent been to sleep before 5am
since i started this dbmail project.

LOL ... if you haven't got the time, I have cut and pasted relevant help.

thanks


either this:
mydestination =  mysql:/etc/postfix/mydestination.cf

or something like this if you like:

mydestination = $myhostname
  localhost.$mydomain
  $mydomain,
  mysql:/usr/local/etc/postfix/mydestination.cf

Yours has alternating commas, whitespace then suddenly nothing :o) Just go with the white space separator. New lines in main.cf within same instruction must start with white space, like above. You only need one line anyway mydestination = mysql:/etc/postfix/mydestination.cf

Ok, Ok , it is fixed i forgot about the white space thing at first and
postfix started asking for = so i just slapped in some commas it works
for email addresses right hahaha.


mydestination.cf for older Postfix


user = dbmail
password = dbmail
dbname = dbmail
hosts = 127.0.0.1 192.168.1.1 # Good to include your replicating mirror DBMS if you have one to avoid Single Point Of Failure
table = DBMA_MTA
select_field = mydestination
where_field = mydestination



I did not think my postfix was so old oh well i seems to kind of work
now I get error below in postfix.  Also when i add an new domain in DBMA
nothing seems to happen until i add an email address that matches the
new domain is this how things are supposed to work?  I will bang away on
postfix transport thing until i hear back from you. Think i need to play
around with the smtp lmtp stuff to get it working last time i got errors
and just went back to the original working configs.  If it is not
broken do not fix it but it seem to be broken now so i must fix.

Mar 31 03:24:13 tokyo postfix/qmgr[41289]: warning: connect to transport
dbmial: No such file or directory

here are the content of my transport file
usr/local/etc/postfix/trasport.cf
###############################################################################
#original how to
canmail.org             dbmail:
graemehill.com          dbmial:

#new but not working
#canmail.org            dbmail-smtp:

#dspam
domain   dspam:
spam.domain  dspam-spam:
harm.domain  dspam-harm:

# do not forget to run postmap /usr/local/etc/postfix/transport


Contains of my main.cf
#this works and is in original setup
transport_maps = hash:/usr/local/etc/postfix/transport
#these are tested but i get errors more testing when i have time lmtp
sounds faster than smtp
#mailbox_transport = dbmail-lmtp:<host>:<port>
#try this
#mailbox_transport = dbmail-smtp:
#local_recipient_maps = mysql:/usr/local/etc/postfix/sql-recipients.cf





Have fun...


Mike


FROM DMBA HELP
main.cf
---------
mydestination = mysql:/etc/postfix/mydestination.cf

You can also do this in main.cf to avoid SPOF if no mirror DBMS is available. Check your Version's documentation for syntax

mydestination = mycriticaldomain.com
myothercriticcaldoman.com
mysql:/etc/postfix/mydestination.cf

mydestination.cf Postfix Pre-Version 2.2
----------------
user = dbmail
password = dbmail
dbname = dbmail
hosts = 127.0.0.1 192.168.1.1 # Add your replicating mirror DBMS to avoid Single Point Of Failure
table = DBMA_MTA
select_field = mydestination
where_field = mydestination

mydestination.cf Postfix Version 2.2 and newer
----------------
user = dbmail
password = dbmail
dbname = dbmail
hosts = 127.0.0.1 192.168.1.1 # Add your replicating mirror DBMS to avoid single point of failure
query = SELECT mydestination FROM DBMA_MTA WHERE mydestination like '%s'






Hopefully it may help you to configure Sendmail, Exim and other MTA's knowing the Table Schema added to the dbmail database:
CREATE TABLE DBMA_MTA (
mydestination varchar(35) NOT NULL default '',
UNIQUE KEY mydestination (mydestination)
) TYPE=MyISAM;


PostgreSQL is a little different.

CREATE TABLE DBMA_MTA (mydestination varchar (35) NOT NULL )
CREATE UNIQUE INDEX mydestination_DBMA_MTA_ukey ON DBMA_MTA(mydestination)



----- Original Message ----- From: "RYAN vAN GINNEKEN" <[EMAIL PROTECTED]>
To: "DBMail mailinglist" <[email protected]>
Sent: Thursday, March 31, 2005 3:51 AM
Subject: [Dbmail] DBMA postfix errors


Is this the right place to post DBMA stuff seems Mike is on this list alot thanks mike v2.2 looks greater excited about the new ACL stuff too. Trying to use the new MTA stuff for DBMA to work with postfix here is my main.cf line that i added

mydestination = $myhostname, localhost.$mydomain $mydomain, mysql:/usr/local/etc/postfix/mydestination.cf

here is the contains of my mydestination.cf file

user = dbmail
password = xxx
dbname = dbmail
hosts = localhost
query = SELECT mydestination FROM DBMA_MTA WHERE mydestination like '%s'


here are the errors from post fix

daemon started -- version 2.1.5
Mar 31 01:35:04 tokyo postfix/pickup[38450]: fatal: /usr/local/etc/postfix/mydestination.cf: bad string length 0 < 1: table = Mar 31 01:35:04 tokyo postfix/qmgr[38451]: fatal: /usr/local/etc/postfix/mydestination.cf: bad string length 0 < 1: table = Mar 31 01:35:05 tokyo postfix/master[38449]: warning: process /usr/local/libexec/postfix/pickup pid 38450 exit status 1 Mar 31 01:35:05 tokyo postfix/master[38449]: warning: /usr/local/libexec/postfix/pickup: bad command startup -- throttling Mar 31 01:35:05 tokyo postfix/master[38449]: warning: process /usr/local/libexec/postfix/qmgr pid 38451 exit status 1 Mar 31 01:35:05 tokyo postfix/master[38449]: warning: /usr/local/libexec/postfix/qmgr: bad command startup -- throttling

_______________________________________________
Dbmail mailing list
[email protected]
https://mailman.fastxs.nl/mailman/listinfo/dbmail


_______________________________________________
Dbmail mailing list
[email protected]
https://mailman.fastxs.nl/mailman/listinfo/dbmail



Reply via email to