# nullmailer, fail2ban, and gmail

## alienjon

I setup fail2ban on my server recently and have been playing around with setting up jails and the like.  I liked the idea of sending e-mails as notifications (at least while I'm learning the program) and set it up to use my gmail account.  When I use nullmailer directly the email sends and receives as expected.  Fail2Ban, however, would send the e-mail with an immediate follow-up e-mail that states:

 *Quote:*   

>  Delivery incomplete
> 
> There was a temporary problem delivering your message to root@{my domain}. Gmail will retry for 20 more hours. You'll be notified if the delivery fails permanently.

 

I was able to get some of these to go away by changing the relevant fail2ban action.d/ files to send to my own e-mail address instead of the non-existent root@{my domain} one, but some are still showing up and I can't help but feel that I'm doing this the hard way.  Has anyone gotten this to work or have thoughts as to what config I'm missing?

----------

## Schnulli

fail2ban works easy from the idea....

reading the logs, what means all has to be logged ! ALL.... 

the rest is the sendmail script, search a few in the web for this sendmail script read it and you got it than, its easy.

Security is often a thing that should not be discussed in the public... got?

Because, they read it as well !

----------

## Syl20

If I well understand, nullmailer is too simple to use aliases, which is what you need to translate "root" into "yourmail@gmail.com". You need a more powerful SMTP server, like Postfix, for example.

----------

