Rerouting mail in queue to another SMTP

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

Rerouting mail in queue to another SMTP

Frank DeChellis
Rerouting mail in queue to another SMTP Hi there,

New to postfix and the list.

We have a new postfix install (v 2.5.6) that we are trying to get going.

My problem is ...  I setup that server to be our gateway in our DNS so the address has propagated when I needed it.  But I left it on with the postfix running for a few hours.

So now I have a server with email box waiting for email, and a server with no email boxes that had port 25 for a few hours with mail in the hold queue (/var/spool/postfix/hold) with no where to go.

Is there a command with postfix to empty the que and send that mail to another smtp server?

Thanks
Frank

P.S.  Stop laughing ;-)

Frank







Frank DeChellis
President, Internet Access Worldwide
Welland, Ontario, Canada
www.iaw.com

Reply | Threaded
Open this post in threaded view
|

Re: Rerouting mail in queue to another SMTP

Barney Desmond
2009/7/9 Frank DeChellis <[hidden email]>:

> We have a new postfix install (v 2.5.6) that we are trying to get going.
>
> My problem is ...  I setup that server to be our gateway in our DNS so the
> address has propagated when I needed it.  But I left it on with the postfix
> running for a few hours.
>
> So now I have a server with email box waiting for email, and a server with
> no email boxes that had port 25 for a few hours with mail in the hold queue
> (/var/spool/postfix/hold) with no where to go.
>
> Is there a command with postfix to empty the que and send that mail to
> another smtp server?

I'm having some difficulty understanding the situation - mail doesn't
usually get to the hold queue as far as I know. What kind of
messages/warnings/etc do you see if you run `postqueue -p`? Postfix
won't accept mail that it can't deliver or doesn't expect to receive,
generally speaking, hence the lack of understanding. If it's simply
mail that wasn't deliverable earlier (say, due to a connection
problem), but should be deliverable now, you can run `postqueue -f` to
attempt to flush the queue and deliver all messages.
Reply | Threaded
Open this post in threaded view
|

Re: Rerouting mail in queue to another SMTP

Wietse Venema
In reply to this post by Frank DeChellis
Frank DeChellis:

> Hi there,
>
> New to postfix and the list.
>
> We have a new postfix install (v 2.5.6) that we are trying to get going.
>
> My problem is ...  I setup that server to be our gateway in our DNS so the
> address has propagated when I needed it.  But I left it on with the postfix
> running for a few hours.
>
> So now I have a server with email box waiting for email, and a server with
> no email boxes that had port 25 for a few hours with mail in the hold queue
> (/var/spool/postfix/hold) with no where to go.
>
> Is there a command with postfix to empty the que and send that mail to
> another smtp server?

To send all mail for "example.com" to "host.example.com":

    # cat >>/etc/postfix/transport
    example.com host.example.com
    # postmap hash:/etc/postfix/transport
    # postconf -e transport_maps=hash:/etc/postfix/transport
    # postfix reload

To release one message from the hold queue:

    # postsuper -H queue_id
    # sendmail -q

And if that is delivered as it should:

    # postsuper -H ALL

        Wietse

> Thanks
> Frank
>
> P.S.  Stop laughing ;-)
>
> Frank
>
>
>
>
>
>
>
> Frank DeChellis
> President, Internet Access Worldwide
> Welland, Ontario, Canada
> www.iaw.com
>
>

Reply | Threaded
Open this post in threaded view
|

Re: Rerouting mail in queue to another SMTP

Victor Duchovni
On Wed, Jul 08, 2009 at 12:42:33PM -0400, Wietse Venema wrote:

>     # cat >>/etc/postfix/transport
>     example.com host.example.com

Surely:

        example.com relay:[host.example.com]

>     # postmap hash:/etc/postfix/transport
>     # postconf -e transport_maps=hash:/etc/postfix/transport
>     # postfix reload

--
        Viktor.

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.

To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
<mailto:[hidden email]?body=unsubscribe%20postfix-users>

If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.