Discussion:
...and this is why I hate postfix (:
Steve Holdoway
2011-09-01 23:16:06 UTC
Permalink
I've got a website set up that hosts it's email externally, but wants to
send mail there.

I have /etc/mailname set to example.com
main.cf
myorigin = /etc/mailname
mydestination = localhost
smtpd_recipient_restrictions = permit_mynetworks
permit_sasl_authenticated reject_unauth_destination

myhostname = adifferentexample.com
mydomain = adifferentexample.com

DNS:
MX record for example.com points to the correct server

But still mail sent to ***@example.com is delivered locally.

What do I need to change to send from the webserver to ***@example.com
where the webserver resolves to example.com.

Bring back sendmail (:


Steve
--
Steve Holdoway BSc(Hons) MNZCS <***@greengecko.co.nz>
http://www.greengecko.co.nz
MSN: ***@greengecko.co.nz
Skype: sholdowa
Hadley Rich
2011-09-02 00:43:34 UTC
Permalink
Post by Steve Holdoway
where the webserver resolves to example.com.
I set up webservers with myhostname and myorigin = foo.nice.net.nz then
send with From: nice.net.nz

hads
--
http://nicegear.co.nz



_______________________________________________
NZLUG mailing list ***@linux.net.nz
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
Robert
2011-09-02 00:38:39 UTC
Permalink
do you want to relay all email via example.com's mailserver or just email for
example.com ?

if just for the one domain something like this?
edit /etc/postfix/transport
example.com smtp:[example.com.mx.server] run:
postmap /etc/postfix/transport
if required to update it. then try again.

Rob
Post by Steve Holdoway
I've got a website set up that hosts it's email externally, but
wants to send mail there.
I have /etc/mailname set to example.com
main.cf
myorigin = /etc/mailname
mydestination = localhost
smtpd_recipient_restrictions = permit_mynetworks
permit_sasl_authenticated reject_unauth_destination
myhostname = adifferentexample.com
mydomain = adifferentexample.com
MX record for example.com points to the correct server
where the webserver resolves to example.com.
Steve
--
http://www.greengecko.co.nz
Skype: sholdowa
--


_______________________________________________
NZLUG mailing list ***@linux.net.nz
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
Steve Holdoway
2011-09-02 01:29:47 UTC
Permalink
I want emails autogenerated by the website example.com to be delivered
to the mail store for example.com which is external. MX records point to
the correct target.
Post by Robert
do you want to relay all email via example.com's mailserver or just email for
example.com ?
if just for the one domain something like this?
edit /etc/postfix/transport
postmap /etc/postfix/transport
if required to update it. then try again.
Rob
Post by Steve Holdoway
I've got a website set up that hosts it's email externally, but
wants to send mail there.
I have /etc/mailname set to example.com
main.cf
myorigin = /etc/mailname
mydestination = localhost
smtpd_recipient_restrictions = permit_mynetworks
permit_sasl_authenticated reject_unauth_destination
myhostname = adifferentexample.com
mydomain = adifferentexample.com
MX record for example.com points to the correct server
where the webserver resolves to example.com.
Steve
--
http://www.greengecko.co.nz
Skype: sholdowa
--
_______________________________________________
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
--
Steve Holdoway BSc(Hons) MNZCS <***@greengecko.co.nz>
http://www.greengecko.co.nz
MSN: ***@greengecko.co.nz
Skype: sholdowa
Steve Holdoway
2011-09-02 01:38:28 UTC
Permalink
Sorry, premature reply there.

relay=none, delay=0.04, delays=0.03/0.01/0/0.01, dsn=5.0.0,
status=bounced (User unknown in virtual alias table)

is what's happening... it's trying to deliver locally, even though I've
created the transport file/hash. Do I need to update main.cf to use it?

Cheers,

Steve
Post by Robert
do you want to relay all email via example.com's mailserver or just email for
example.com ?
if just for the one domain something like this?
edit /etc/postfix/transport
postmap /etc/postfix/transport
if required to update it. then try again.
Rob
Post by Steve Holdoway
I've got a website set up that hosts it's email externally, but
wants to send mail there.
I have /etc/mailname set to example.com
main.cf
myorigin = /etc/mailname
mydestination = localhost
smtpd_recipient_restrictions = permit_mynetworks
permit_sasl_authenticated reject_unauth_destination
myhostname = adifferentexample.com
mydomain = adifferentexample.com
MX record for example.com points to the correct server
where the webserver resolves to example.com.
Steve
--
http://www.greengecko.co.nz
Skype: sholdowa
--
_______________________________________________
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
--
Steve Holdoway BSc(Hons) MNZCS <***@greengecko.co.nz>
http://www.greengecko.co.nz
MSN: ***@greengecko.co.nz
Skype: sholdowa
Graeme Bruton
2011-09-02 07:54:16 UTC
Permalink
Did you re-generate the hash file?
Post by Steve Holdoway
Sorry, premature reply there.
relay=none, delay=0.04, delays=0.03/0.01/0/0.01, dsn=5.0.0,
status=bounced (User unknown in virtual alias table)
is what's happening... it's trying to deliver locally, even though I've
created the transport file/hash. Do I need to update main.cf to use it?
Cheers,
Steve
Post by Robert
do you want to relay all email via example.com's mailserver or just email for
example.com ?
if just for the one domain something like this?
edit /etc/postfix/transport
postmap /etc/postfix/transport
if required to update it. then try again.
Rob
Post by Steve Holdoway
I've got a website set up that hosts it's email externally, but
wants to send mail there.
I have /etc/mailname set to example.com
main.cf
myorigin = /etc/mailname
mydestination = localhost
smtpd_recipient_restrictions = permit_mynetworks
permit_sasl_authenticated reject_unauth_destination
myhostname = adifferentexample.com
mydomain = adifferentexample.com
MX record for example.com points to the correct server
where the webserver resolves to example.com.
Steve
--
http://www.greengecko.co.nz
Skype: sholdowa
--
_______________________________________________
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
--
http://www.greengecko.co.nz
Skype: sholdowa
_______________________________________________
NZLUG mailing list ***@linux.net.nz
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
Nick Rout
2011-09-02 07:55:30 UTC
Permalink
On Fri, Sep 2, 2011 at 7:54 PM, Graeme Bruton
Post by Graeme Bruton
Did you re-generate the hash file?
Post by Steve Holdoway
Sorry, premature reply there.
relay=none, delay=0.04, delays=0.03/0.01/0/0.01, dsn=5.0.0,
status=bounced (User unknown in virtual alias table)
is what's happening... it's trying to deliver locally, even though I've
created the transport file/hash. Do I need to update main.cf to use it?
postfix has a great mailing list.

_______________________________________________
NZLUG mailing list ***@linux.net.nz
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
Steve Holdoway
2011-09-02 08:22:39 UTC
Permalink
well, I *generated* it as it didn't previously exist! Is an entry
necessart in main.cf?

Cheers,

Steve
Post by Graeme Bruton
Did you re-generate the hash file?
Post by Steve Holdoway
Sorry, premature reply there.
relay=none, delay=0.04, delays=0.03/0.01/0/0.01, dsn=5.0.0,
status=bounced (User unknown in virtual alias table)
is what's happening... it's trying to deliver locally, even though I've
created the transport file/hash. Do I need to update main.cf to use it?
Cheers,
Steve
Post by Robert
do you want to relay all email via example.com's mailserver or just email
for
Post by Steve Holdoway
Post by Robert
example.com ?
if just for the one domain something like this?
edit /etc/postfix/transport
postmap /etc/postfix/transport
if required to update it. then try again.
Rob
Post by Steve Holdoway
I've got a website set up that hosts it's email externally, but
wants to send mail there.
I have /etc/mailname set to example.com
main.cf
myorigin = /etc/mailname
mydestination = localhost
smtpd_recipient_restrictions = permit_mynetworks
permit_sasl_authenticated reject_unauth_destination
myhostname = adifferentexample.com
mydomain = adifferentexample.com
MX record for example.com points to the correct server
where the webserver resolves to example.com.
Steve
--
http://www.greengecko.co.nz
Skype: sholdowa
--
_______________________________________________
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
--
http://www.greengecko.co.nz
Skype: sholdowa
_______________________________________________
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
--
Steve Holdoway <***@greengecko.co.nz>
http://www.greengecko.co.nz
MSN: ***@greengecko.co.nz
Skype: sholdowa


_______________________________________________
NZLUG mailing list ***@linux.net.nz
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
Dagan
2011-09-02 09:55:16 UTC
Permalink
--=-fhFjnPddCSNSylWaelNR
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
I've got a website set up that hosts it's email externally, but wants to
send mail there.
Do you have relayhost setting set to the external mail server address?

Dagan


_______________________________________________
NZLUG mailing list ***@linux.net.nz
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug
Chris Neilson
2011-09-07 03:07:30 UTC
Permalink
Message: 9
Date: Fri, 02 Sep 2011 20:22:39 +1200
Content-Type: text/plain; charset="UTF-8"
well, I *generated* it as it didn't previously exist! Is an entry
necessart in main.cf?
Cheers,
Steve
if you are altering/creating a postfix hash map you need to "postmap
file_name" (or postmap file_type:filename if you dont want the
default_database_type)
http://www.postfix.org/postmap.1.html

I dont believe you need to reference the transport file in main.cf
Post by Graeme Bruton
Did you re-generate the hash file?
Post by Steve Holdoway
Sorry, premature reply there.
relay=none, delay=0.04, delays=0.03/0.01/0/0.01, dsn=5.0.0,
status=bounced (User unknown in virtual alias table)
This error means you are trying to send to an invalid recipient.
http://www.postfix.org/ADDRESS_CLASS_README.html

Im not sure what you mean by "MX record for example.com points to the
correct server" whether the web server or the external mail server is
"correct"

if the external mail server is the correct MX you have probably
forgotten to postmap the transport file or its not configured correctly.

if the web server is the MX record then you are likely trying to
configure a virtual domain and are missing the virtual_alias_maps
setting (or this setting is misconfigured)
http://www.postfix.org/postconf.5.html#virtual_alias_maps
http://www.postfix.org/VIRTUAL_README.html
Post by Graeme Bruton
Post by Steve Holdoway
is what's happening... it's trying to deliver locally,
no its not trying to deliver locally, its treating the address as a
virtual domain
http://www.postfix.org/VIRTUAL_README.html#canonical
even though I've
Post by Graeme Bruton
Post by Steve Holdoway
created the transport file/hash. Do I need to update main.cf to use it?
Cheers,
Steve
_______________________________________________
NZLUG mailing list ***@linux.net.nz
http://www.linux.net.nz/cgi-bin/mailman/listinfo/nzlug

Continue reading on narkive:
Loading...