Question about Virtual Host configuration in Postfix

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Question about Virtual Host configuration in Postfix

Christopher Adams-3
I have a Virtual Host setup in Apache.

I would like to create a mail alias for that Virtual Host.

Here is what I have done.

To /etc/postfix/main.cf, I have added this line:

virtual_alias_maps = hash:/etc/postfix/virtual

I modified the /etc/postfix/virtual file like this:

myvirtualhost.org  domain my virtual host
[hidden email]  [hidden email], [hidden email]

Then I ran these commands:

postfix reload

postmap /etc/postfix/virtual

If I send a message  to [hidden email] from the machine that hosts the domain, it is delivered successfully to both addresses.

If I send a message from outside the domain (as an example, here from my.mail.server.ip), I get this message:

[hidden email] on 7/9/2008 8:43 AM
            smtp.secureserver.net: Failed (553 sorry, relaying denied from your location [my.mail.server.ip] (#5.7.1))


What do I need to do to fix this?

--
Christopher Adams
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Question about Virtual Host configuration in Postfix

Brian Evans - Postfix List
Christopher Adams wrote:

> I have a Virtual Host setup in Apache.
>
> I would like to create a mail alias for that Virtual Host.
>
> Here is what I have done.
>
> To /etc/postfix/main.cf <http://main.cf>, I have added this line:
>
> virtual_alias_maps = hash:/etc/postfix/virtual
>
> I modified the /etc/postfix/virtual file like this:
>
> myvirtualhost.org <http://myvirtualhost.org>  domain my virtual host
> [hidden email] <mailto:[hidden email]>  
> [hidden email] <mailto:[hidden email]>, [hidden email]
> <mailto:[hidden email]>
>
> Then I ran these commands:
>
> postfix reload
>
> postmap /etc/postfix/virtual
>
> If I send a message  to [hidden email]
> <mailto:[hidden email]> from the machine that hosts the
> domain, it is delivered successfully to both addresses.
>
> If I send a message from outside the domain (as an example, here from
> my.mail.server.ip), I get this message:
>
> [hidden email] <mailto:[hidden email]> on
> 7/9/2008 8:43 AM
>             smtp.secureserver.net <http://smtp.secureserver.net>:
> Failed (553 sorry, relaying denied from your location
> [my.mail.server.ip] (#5.7.1))
In order to receive mail from the outside world for local delivery, a
domain must be listed in ONE of mydestination, relay_domains,
virtual_mailbox_domains or virtual_alias_domains.

Your case points to use of a virtual_alias_domain for rewriting to the
local mydestination as a possibility.

Please read http://www.postfix.org/VIRTUAL_README.html including the
#virtual_alias example.

Brian

Reply | Threaded
Open this post in threaded view
|

Re: Question about Virtual Host configuration in Postfix

Noel Jones-2
In reply to this post by Christopher Adams-3
when posting from gmail, please press the "Plain Text" button

Christopher Adams wrote:

> I have a Virtual Host setup in Apache.
>
> I would like to create a mail alias for that Virtual Host.
>
> Here is what I have done.
>
> To /etc/postfix/main.cf <http://main.cf>, I have added this line:
>
> virtual_alias_maps = hash:/etc/postfix/virtual
>
> I modified the /etc/postfix/virtual file like this:
>
> myvirtualhost.org <http://myvirtualhost.org>  domain my virtual host
> [hidden email] <mailto:[hidden email]>  
> [hidden email] <mailto:[hidden email]>, [hidden email]
> <mailto:[hidden email]>
>
> Then I ran these commands:
>
> postfix reload
>
> postmap /etc/postfix/virtual
>
> If I send a message  to [hidden email]
> <mailto:[hidden email]> from the machine that hosts the
> domain, it is delivered successfully to both addresses.
>

Your settings as described are correct.  Verify you did what
you think.


> If I send a message from outside the domain (as an example, here from
> my.mail.server.ip), I get this message:
>
> [hidden email] <mailto:[hidden email]> on 7/9/2008
> 8:43 AM
>             smtp.secureserver.net <http://smtp.secureserver.net>: Failed
> (553 sorry, relaying denied from your location [my.mail.server.ip] (#5.7.1))

This isn't a postfix error message.  Do you have a firewall or
other device that also wants to know about the domains you
accept mail for?  Can you show postfix log entries from this
transaction?


>
>
> What do I need to do to fix this?
>
> --
> Christopher Adams
> [hidden email] <mailto:[hidden email]>

--
Noel Jones