If I don't want to queue emails, which value I've to give to default_transport?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

If I don't want to queue emails, which value I've to give to default_transport?

Michele Carandente
Hi to everybody.
I'm queuing all the emails to be sent.
So the option that is doing it is: default_transport = smtp

I would like to have the option to send directly emails, without queue.
So I was thinking to write something like:
default_transport = mysql:/etc/postfix/default_transport.cf
where the database was giving me the right value to do it.

In this case which will be the value of default transport to send
email without put in queue?
I tried with an empty value, but it's not working... it's look like
need to be commented out...

any idea?

Thanks
Michele
Reply | Threaded
Open this post in threaded view
|

Re: If I don't want to queue emails, which value I've to give to default_transport?

Barney Desmond
On 15 February 2010 21:25, Michele Carandente <[hidden email]> wrote:

> Hi to everybody.
> I'm queuing all the emails to be sent.
> So the option that is doing it is: default_transport = smtp
>
> I would like to have the option to send directly emails, without queue.
> So I was thinking to write something like:
> default_transport = mysql:/etc/postfix/default_transport.cf
> where the database was giving me the right value to do it.
>
> In this case which will be the value of default transport to send
> email without put in queue?
> I tried with an empty value, but it's not working... it's look like
> need to be commented out...

Unless I'm very much mistaken, this is not possible. Email does not
work this way.

Choice of transport selects routing for the next hop, but messages
still need to be delivered by a protocol; that protocol is still
typically SMTP. SMTP is a store-and-forward architecture.

I would suggest you have a look at Postfix's architecture overview:
http://www.postfix.org/OVERVIEW.html#delivering

You will notice that all the delivery mechanisms on the right are
attached to the queue manager.

If you still have an issue, you should describe the original *problem*
that you are trying to solve. There is no way to jump the queue by
using transports, that only affects where mail will go as it leaves
the queue.
Reply | Threaded
Open this post in threaded view
|

Re: If I don't want to queue emails, which value I've to give to default_transport?

Reinaldo Gil Lima de Carvalho
In reply to this post by Michele Carandente
On Mon, Feb 15, 2010 at 7:25 AM, Michele Carandente
<[hidden email]> wrote:
> Hi to everybody.
> I'm queuing all the emails to be sent.
> So the option that is doing it is: default_transport = smtp
>
> I would like to have the option to send directly emails, without queue.

You can't, at least if you not to write the code :).

But you can and should queue only deliverable messages (postfix will
do this if you haven't broked the configuration).

And, you can but should avoid, put queue directory in RAM. And don't
forget a stop/startup script to save and restore RAM fs content, and
recover from a abrupt reboot.

--
Reinaldo de Carvalho
http://korreio.sf.net
http://python-cyrus.sf.net

"Don't try to adapt the software to the way you work, but rather
yourself to the way the software works" (myself)
Reply | Threaded
Open this post in threaded view
|

Re: If I don't want to queue emails, which value I've to give to default_transport?

Reinaldo Gil Lima de Carvalho
On Tue, Feb 16, 2010 at 1:55 PM, Michele Carandente
<[hidden email]> wrote:

>> But you can and should queue only deliverable messages (postfix will
>> do this if you haven't broked the configuration).
>
> How?
> I have not a standard configuration of postfix.
> This is part of the main.cf:
>
> mydestination = localhost, localhost.localdomain
> relayhost =
> mynetworks = 127.0.0.0/8 10.10.1.0/24
> virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
> #virtual_mailbox_domains =
> virtual_mailbox_base = /var/vmail
> virtual_uid_maps = static:5000
> virtual_gid_maps = static:5000
> transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
> sender_dependent_relayhost_maps = mysql:/etc/postfix/mysql-virtual_smtp_relay.cf
> defer_transports = smtp
> default_transport = smtp
>
> Basically the local users will be match in the transport_maps, when
> mysql is returning the value 'virtual'.

You aren't saying the problem what you want to solve, you need
understand Postfix Address Classes.

Following your crackpot:

1. Reject emails before queue at smtpd level and not (un)setting a transport.
2. To discard emails not listed in transport_maps use
default_transport = discard (unusual).

> Otherwhise the email will be stored in queue.
>

To go to queue is not a problem, not to be deliverable is a problem.


--
Reinaldo de Carvalho
http://korreio.sf.net
http://python-cyrus.sf.net

"Don't try to adapt the software to the way you work, but rather
yourself to the way the software works" (myself)
Reply | Threaded
Open this post in threaded view
|

Re: If I don't want to queue emails, which value I've to give to default_transport?

Michele Carandente
This is what I want:
This is a local mailserver, where all the emails generally are queued
and then relayed to differents smtp servers (depending of the sender).
As internal emails I'll have different emails from differents
domain... but I want to be able to say to postfix that one email is
not local for the next 3 days...
With the configuration that I've I'm able to do it.
What I want now is be free to say to postfix that, when I want, all
the emails will be relayed automatically (instead of be queued)

So I need some value for defer_transports and default_transport
(because, as I said before, if I comment out this 2 commands, postfix
is relaying without put in queue...)

I hope I'm more understandable...
Thanks
Michele
Reply | Threaded
Open this post in threaded view
|

Re: If I don't want to queue emails, which value I've to give to default_transport?

Reinaldo Gil Lima de Carvalho
On Wed, Feb 17, 2010 at 6:09 AM, Michele Carandente
<[hidden email]> wrote:
> This is what I want:
> This is a local mailserver, where all the emails generally are queued
> and then relayed to differents smtp servers (depending of the sender).

Sender?

> As internal emails I'll have different emails from differents
> domain... but I want to be able to say to postfix that one email is
> not local for the next 3 days...


If you defer 'smtp' transport, you need set a new service in master.cf:

smtp-fine      unix  -       -       -       -       -       smtp

Configure transport_maps:

[hidden email]       smtp-fine:


> With the configuration that I've I'm able to do it.
> What I want now is be free to say to postfix that, when I want, all
> the emails will be relayed automatically (instead of be queued)
>
> So I need some value for defer_transports and default_transport
> (because, as I said before, if I comment out this 2 commands, postfix
> is relaying without put in queue...)
>
> I hope I'm more understandable...
> Thanks
> Michele
>



--
Reinaldo de Carvalho
http://korreio.sf.net
http://python-cyrus.sf.net

"Don't try to adapt the software to the way you work, but rather
yourself to the way the software works" (myself)