Re: round robin map with ipv4 and ipv6

2020-02-14 Thread Emanuel


El 12/2/20 a las 20:14, Wietse Venema escribió:

Emanuel:

Is it possible to create different files with different IP addresses so
that when sending an email they are sent from different round maps?

You would use master.cf entries with different smtp_bind_address or
smtp_bind_address6 settings, and select one with a filter command.

With master.cf entries

/etc/postfix/master.cf:
 relay-1 unix  -   -   n   -   -   smtp
 -o smtp_bind_address=1.2.3.1
 relay-2 unix  -   -   n   -   -   smtp
 -o smtp_bind_address=1.2.3.2
 relay-3 unix  -   -   n   -   -   smtp
 -o smtp_bind_address=1.2.3.3
 relay-4 unix  -   -   n   -   -   smtp
 -o smtp_bind_address=1.2.3.4

Then you need a nested table which requires a restriction class.

/etc/postfix/main.cf:
 smtpd_client_restrictions = check_client_access
inline:{
   { 200.58.x.x = class1 }
   { 200.58.x.y = class2 }
}

 restriction_classes = class1, class2
 class1 = check_client_access randmap:{filter relay-1:, filter relay-2:}
 class2 = check_client_access randmap:{filter relay-3:, filter relay-4:}

Instead of inline:{}, a hash or pcre table would work too.


YES.! i need this!

so I can call a file and indicate the class, this is very useful?

/etc/postfix/main.cf:
    smtpd_client_restrictions = check_client_access
    inline:{
       { hash:/etc/postfix/bad_client = class1 }
       { hash:/etc/postfix/bad_client = class2 }
    }

Thanks so much, for your help.



Wietse

--
envialosimple.com   
Emanuel Gonzalez
IT / Departamento Emails
emanuel.gonza...@donweb.com 
www.envialosimple.com 
by donweb 

Nota de confidencialidad: Este mensaje y archivos adjuntos al mismo son 
confidenciales, de uso exclusivo para el destinatario del mismo. La 
divulgación y/o uso del mismo sin autorización por parte de DonWeb.com 
queda prohibida.
DonWeb.com no se hace responsable del mensaje por la falsificación y/o 
alteración del mismo.
De no ser Ud el destinatario del mismo y lo ha recibido por error, por 
favor, notifique al remitente y elimínelo de su sistema.
Confidentiality Note: This message and any attachments (the message) are 
confidential and intended solely for the addressees. Any unauthorised 
use or dissemination is prohibited by DonWeb.com.

DonWeb.com shall not be liable  for the message if altered or falsified.
If you are not the intended addressee of this message, please cancel it 
immediately and inform the sender
Nota de Confidencialidade: Esta mensagem e seus eventuais anexos podem 
conter dados confidenciais ou privilegiados.
Se você os recebeu por engano ou não é um dos destinatários aos quais 
ela foi endereçada, por favor destrua-a e a todos os seus eventuais 
anexos ou copias realizadas, imediatamente.
É proibida a retenção, distribuição, divulgação ou utilização de 
quaisquer informações aqui contidas.
Por favor, informenos sobre o recebimento indevido desta mensagem, 
retornando-a para o autor.




Re: round robin map with ipv4 and ipv6

2020-02-14 Thread Wietse Venema
Emanuel:
[ Charset windows-1252 converted... ]
> 
> El 12/2/20 a las 20:14, Wietse Venema escribi?:
> > Emanuel:
> >> Is it possible to create different files with different IP addresses so
> >> that when sending an email they are sent from different round maps?
> > You would use master.cf entries with different smtp_bind_address or
> > smtp_bind_address6 settings, and select one with a filter command.
> >
> > With master.cf entries
> >
> > /etc/postfix/master.cf:
> >  relay-1 unix  -   -   n   -   -   smtp
> >  -o smtp_bind_address=1.2.3.1
> >  relay-2 unix  -   -   n   -   -   smtp
> >  -o smtp_bind_address=1.2.3.2
> >  relay-3 unix  -   -   n   -   -   smtp
> >  -o smtp_bind_address=1.2.3.3
> >  relay-4 unix  -   -   n   -   -   smtp
> >  -o smtp_bind_address=1.2.3.4
> >
> > Then you need a nested table which requires a restriction class.
> >
> > /etc/postfix/main.cf:
> >  smtpd_client_restrictions = check_client_access
> > inline:{
> >{ 200.58.x.x = class1 }
> >{ 200.58.x.y = class2 }
> > }
> >
> >  restriction_classes = class1, class2
> >  class1 = check_client_access randmap:{filter relay-1:, filter relay-2:}
> >  class2 = check_client_access randmap:{filter relay-3:, filter relay-4:}
> >
> > Instead of inline:{}, a hash or pcre table would work too.
> 
> YES.! i need this!
> 
> so I can call a file and indicate the class, this is very useful?
> 
> /etc/postfix/main.cf:
>  smtpd_client_restrictions = check_client_access
>  inline:{
> { hash:/etc/postfix/bad_client = class1 }
> { hash:/etc/postfix/bad_client = class2 }
>  }

No, I wrote INSTEAD OF inline:{}, a hash or pcre table would work.

Wietse


Query

2020-02-14 Thread Peter Fraser
Hi AllI am trying to figure out how to get this working. I run Mailman through Postfix. The Mailman aliases are in alias_maps. I find that when I set up a transport map in Postfix to have Postfix forward the emails through another email gateway, the aliases in alias_maps are bypassed so mailman will not work. Is this expected behavior and is there are way around this? Would really appreciate any assistance. Best RegardsSI Sent from Mail for Windows 10 


Re: Query

2020-02-14 Thread Curtis Maurand
you could set up the mail aliases in transport maps to pass them to mailman

Sent from my iPhone

> On Feb 14, 2020, at 10:43 AM, Peter Fraser  wrote:
> 
> 
> Hi All
> I am trying to figure out how to get this working. I run Mailman through 
> Postfix. The Mailman aliases are in alias_maps. I find that when I set up a 
> transport map in Postfix to have Postfix forward the emails through another 
> email gateway, the aliases in alias_maps are bypassed so mailman will not 
> work. Is this expected behavior and is there are way around this? Would 
> really appreciate any assistance.
>  
> Best Regards
> SI
>  
> Sent from Mail for Windows 10
>  


Re: Query

2020-02-14 Thread Phil Stracchino
On 2020-02-14 10:42, Peter Fraser wrote:
> Hi All
> 
> I am trying to figure out how to get this working. I run Mailman through
> Postfix. The Mailman aliases are in alias_maps. I find that when I set
> up a transport map in Postfix to have Postfix forward the emails through
> another email gateway, the aliases in alias_maps are bypassed so mailman
> will not work. Is this expected behavior and is there are way around
> this? Would really appreciate any assistance.


My experience has been that when you set up the aliases according to
Mailman's instructions for integrating Mailman with Postfix, it Just Works.



-- 
  Phil Stracchino
  Babylon Communications
  ph...@caerllewys.net
  p...@co.ordinate.org
  Landline: +1.603.293.8485
  Mobile:   +1.603.998.6958


Using Postfix to send home server alerts

2020-02-14 Thread Ian Evans
Hi,

Just looking for a pointer to a recommended tutorial on setting up Postfix
as a send only service to be able to send alert emails from a home server
like smartmontools drive warnings etc.

I have seen several tutorials that touch on this, but the part I'm not
clear on is the FQDN setting. It's home server so it doesn't have a public
domain name. If my dynamic DNS provider reaches my home server at
myhome.example.com, would that be the FQDN?

If this makes it easier, I do have a fully functional Postfix mail server
on my website server. Is there a way for the home server to send its alert
emails via the business server? Or should the home send-only Postfix send
through Gmail somehow?

Thanks.


Re: Using Postfix to send home server alerts

2020-02-14 Thread Ansgar Wiechers
On 2020-02-14 Ian Evans wrote:
> Just looking for a pointer to a recommended tutorial on setting up
> Postfix as a send only service to be able to send alert emails from a
> home server like smartmontools drive warnings etc.

What you're looking for is called a "null client."



> If this makes it easier, I do have a fully functional Postfix mail
> server on my website server. Is there a way for the home server to
> send its alert emails via the business server?

Yes. Configure that server as the relayhost on your null client. You may
want to set up authentication between the client and server too.



> Or should the home send-only Postfix send through Gmail somehow?

That would be another option, yes.



Regards
Ansgar Wiechers
-- 
"Abstractions save us time working, but they don't save us time learning."
--Joel Spolsky


Re: Using Postfix to send home server alerts

2020-02-14 Thread Peter

On 15/02/20 10:31 am, Ian Evans wrote:

Hi,

Just looking for a pointer to a recommended tutorial on setting up 
Postfix as a send only service to be able to send alert emails from a 
home server like smartmontools drive warnings etc.


If this makes it easier, I do have a fully functional Postfix mail 
server on my website server. Is there a way for the home server to send 
its alert emails via the business server? Or should the home send-only 
Postfix send through Gmail somehow?


You're basically asking postfix to fill the roll of a null mailer. 
Postfix can do this but there are other tools that are simpler to 
configure and better suited to that roll.  I recommend msmtp:


https://marlam.de/msmtp/


Peter


Re: Query

2020-02-14 Thread Peter

On 15/02/20 5:02 am, Curtis Maurand wrote:
I am trying to figure out how to get this working. I run Mailman 
through Postfix. The Mailman aliases are in alias_maps. I find that 
when I set up a transport map in Postfix to have Postfix forward the 
emails through another email gateway, the aliases in alias_maps are 
bypassed so mailman will not work. Is this expected behavior and is 
there are way around this? Would really appreciate any assistance.


You probably want to use relayhost or default_transport instead of 
transport_maps.



Peter