|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Scott Lampert (scott
lampert.org)Date: Tue Apr 16 2002 - 22:09:06 CDT
I'm having a problem getting postfix to ignore an mx record and
forward directly to a specific host. Basically I have a content filter I
wrote that just accepts the e-mail from postfix on stdin and reinjects
it as an smtp delivery to another port on the same host. I need the
second port to forward it irregardless of any mx records to a specific
host. Here's postconf -n:
alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
mail_owner = postfix
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain $mydomain
mynetworks = 127.0.0.0/8
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /etc/postfix/README_FILES
relay_domains = $mydestination, mydomain.com
sample_directory = /etc/postfix/samples
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
And my master.cf
smtp inet n - y - - smtpd
-o content_filter=filter:
filter unix - n n - - pipe
flags=R user=apache argv=/usr/local/bin/myfilter -r ${recipient}
-s ${sender} localhost:10025 inet n - n - -
smtpd -o content_filter=
-o local_recipient_maps=
-o transport_maps=hash:/etc/postfix/transport
pickup fifo n - y 60 1 pickup
cleanup unix n - y - 0 cleanup
qmgr fifo n - y 300 1 qmgr
#qmgr fifo n - n 300 1 nqmgr
rewrite unix - - y - - trivial-rewrite
bounce unix - - y - 0 bounce
defer unix - - y - 0 bounce
flush unix n - y 1000? 0 flush
smtp unix - - y - - smtp
showq unix n - y - - showq
error unix - - y - - error
local unix - n n - - local
virtual unix - n y - - virtual
lmtp unix - - y - - lmtp
The transport file contains:
mydomain.com smtp:[mailhub.mydomain.com]
.mydomain.com smtp:[mailhub.mydomain.com]
Reading the documentation on transport maps I would have thought that
putting braces around mailhub.mydomain.com would cause postfix to ignore
any associated MX records, but that appears not to be the case.
Originally I attempted to just set relayhost=[mailhub.mydomain.com] in
main.cf but that didn't work either. I keep getting an error about this
system being the best MX record and causing a mail loop, which is
correct, since this host IS the only MX record, but once it has done
what it needs to do with the mail I need to forward it onwards to its
actual destination, mailhub.mydomain.com.
I'm sure I must be overlooking something obvious since all those virus
scanning filters must work this way too. If someone could hit me with
the clue stick I'd appreciate it.
Thanks,
-Scott
-- Scott Lampert <scottlampert.org> "They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin, 1759
Public Key: http://www.lampert.org/lampert.key
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD)
iD8DBQE8vOdVSVL3/uWE7xYRAtruAJ49+Y/1FWxsFTmEI9DLgu3sTHz7pwCgnxe6 BCAhpIBsZZZ6Y7wHwcYOuhs= =iZ/A -----END PGP SIGNATURE-----
-
To unsubscribe, send mail to majordomo
postfix.org with content
(not subject): unsubscribe postfix-users
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]