Re: [Bacula-users] bsmtp failing to connect to mail server

2015-08-12 Thread Alex Domoradov
If you don't want change/configure postfix - I may suggest to use swaks.
It's a perl script which has a lot of functionality. I'm using the
following command with nagios without any problem

/usr/bin/printf "%b" "$MESSAGE\n" | /usr/bin/swaks -4 --server
smtp.googlemail.com:587 --from $USER3$ --to $CONTACTEMAIL$ -tls --auth
PLAIN --auth-user $USER3$ --auth-password $USER4$ --h-Subject "$SUBJ"
--body - --hide-all

On Wed, Aug 12, 2015 at 7:38 AM, Jerry Lowry  wrote:

> Thank you all for the pointers and information regarding postfix and
> google mail.  I have not determined which way I am going to proceed yet.
> To many other fires, which makes me check on the backups rather than check
> the email.
>
> Kind regards,
>
> jerry
>
> On Sun, Aug 9, 2015 at 11:37 AM, Dimitri Maziuk 
> wrote:
>
>> On 2015-08-08 14:23, Jerry Lowry wrote:
>> > Heitor,  Sorry for not saying this in the original text.  It does the
>> > same thing when I specify 'localhost'.
>> >
>> > I don't really need 'tls' that is just what gmail is looking for when I
>> > try to use them as the sending mail server.
>>
>> Send-only postfix setup that also accepts mail on 127.0.0.1:
>>
>>   /etc/postfix/main.cf:
>>
>> myorigin = $mydomain
>> inet_interfaces = localhost
>> inet_protocols = ipv4
>> mydestination =
>> relayhost = $mydomain
>> local_transport = error:local mail delivery is disabled
>>
>> -- change myorigin and relayhost as appropriate. Plus,
>>
>>   /etc/postfix/master.cf:
>>
>> #local unix  -   n   n   -   -   local
>>
>> (i.e. the "local" line commented out).
>>
>> Make sure iptables isn't blocking port 25 on localhost.
>>
>> To test:
>>
>> telnet localhost 25
>>
>> -- if you get "connected" and 220 code from postfix you should be good
>> to go. Note that sending mail from command line is not a useful test
>> since it doesn't necessarily work the same way. It's calling the
>> sendmail binary directly instead of talking to the server on port 25.
>>
>> And then there's gmail. It delivers some messages to "all mail" instead
>> of inbox, messages whose From and To addresses are the same just vanish,
>> and so on. So check the postfix log after running a test job: it may
>> well be there's nothing wrong with your bsmtp or postfix config.
>>
>> Dima
>>
>>
>> --
>> ___
>> Bacula-users mailing list
>> Bacula-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/bacula-users
>>
>
>
>
> --
>
> ___
> Bacula-users mailing list
> Bacula-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
>
>
--
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] bsmtp failing to connect to mail server

2015-08-11 Thread Jerry Lowry
Thank you all for the pointers and information regarding postfix and google
mail.  I have not determined which way I am going to proceed yet.  To many
other fires, which makes me check on the backups rather than check the
email.

Kind regards,

jerry

On Sun, Aug 9, 2015 at 11:37 AM, Dimitri Maziuk 
wrote:

> On 2015-08-08 14:23, Jerry Lowry wrote:
> > Heitor,  Sorry for not saying this in the original text.  It does the
> > same thing when I specify 'localhost'.
> >
> > I don't really need 'tls' that is just what gmail is looking for when I
> > try to use them as the sending mail server.
>
> Send-only postfix setup that also accepts mail on 127.0.0.1:
>
>   /etc/postfix/main.cf:
>
> myorigin = $mydomain
> inet_interfaces = localhost
> inet_protocols = ipv4
> mydestination =
> relayhost = $mydomain
> local_transport = error:local mail delivery is disabled
>
> -- change myorigin and relayhost as appropriate. Plus,
>
>   /etc/postfix/master.cf:
>
> #local unix  -   n   n   -   -   local
>
> (i.e. the "local" line commented out).
>
> Make sure iptables isn't blocking port 25 on localhost.
>
> To test:
>
> telnet localhost 25
>
> -- if you get "connected" and 220 code from postfix you should be good
> to go. Note that sending mail from command line is not a useful test
> since it doesn't necessarily work the same way. It's calling the
> sendmail binary directly instead of talking to the server on port 25.
>
> And then there's gmail. It delivers some messages to "all mail" instead
> of inbox, messages whose From and To addresses are the same just vanish,
> and so on. So check the postfix log after running a test job: it may
> well be there's nothing wrong with your bsmtp or postfix config.
>
> Dima
>
>
> --
> ___
> Bacula-users mailing list
> Bacula-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
>
--
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] bsmtp failing to connect to mail server

2015-08-10 Thread Josh Fisher



On 8/7/2015 6:15 PM, Jerry Lowry wrote:

All,

I have recently setup two separate bacula servers on two subnets.  
They were using one server and going through the firewall for one of 
the subnets.  The previous configuration worked well but for security 
reasons and speed I separated them.
Along with this change the company decided to move from an inhouse 
email server to gmail.


Since the move to gmail I have not been able to get the bsmtp 
configuration to work.  I have tried to use gmail but it requires tls.


Jul 20 10:26:59 distress bacula-dir: 20-Jul 10:26 Message delivery 
ERROR: Mail
prog: bsmtp: bsmtp.c:145 Fatal malformed reply from 
smtp.googlemail.com : 530 5.7

.0 Must issue a STARTTLS command first. b9sm14093516ioj.6 - gsmtp

So, I have configured postfix/cyrus on the backup server just to send 
email.  The problem I get from bsmtp now is that it can not connect to 
the mail server.


[root@kilchis bin]# /usr/bacula/bin/bsmtp -d 25 -h kilchis.server.com 
 -f \"\(Bacula\) \\>\" -s \"Bacula daemon message\" 
r...@server.com "

test message
"
bsmtp: bsmtp.c:338-0 Debug level = 25
bsmtp: bsmtp.c:346-0 host=kilchis.server.com 
bsmtp: bsmtp.c:356-0 subject="Bacula
bsmtp: bsmtp.c:432-0 My hostname is: kilchis
bsmtp: bsmtp.c:456-0 From addr="(Bacula)
bsmtp: bsmtp.c:514-0 Failed to connect to mailhost kilchis.server.com 



What does postfix log to maillog when bsmtp fails?



I can send mail from the command prompt and it works just fine.

What am I missing?

thanks


--


___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


--
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] bsmtp failing to connect to mail server

2015-08-09 Thread Dimitri Maziuk
On 2015-08-08 14:23, Jerry Lowry wrote:
> Heitor,  Sorry for not saying this in the original text.  It does the
> same thing when I specify 'localhost'.
>
> I don't really need 'tls' that is just what gmail is looking for when I
> try to use them as the sending mail server.

Send-only postfix setup that also accepts mail on 127.0.0.1:

  /etc/postfix/main.cf:

myorigin = $mydomain
inet_interfaces = localhost
inet_protocols = ipv4
mydestination =
relayhost = $mydomain
local_transport = error:local mail delivery is disabled

-- change myorigin and relayhost as appropriate. Plus,

  /etc/postfix/master.cf:

#local unix  -   n   n   -   -   local

(i.e. the "local" line commented out).

Make sure iptables isn't blocking port 25 on localhost.

To test:

telnet localhost 25

-- if you get "connected" and 220 code from postfix you should be good 
to go. Note that sending mail from command line is not a useful test 
since it doesn't necessarily work the same way. It's calling the 
sendmail binary directly instead of talking to the server on port 25.

And then there's gmail. It delivers some messages to "all mail" instead 
of inbox, messages whose From and To addresses are the same just vanish, 
and so on. So check the postfix log after running a test job: it may 
well be there's nothing wrong with your bsmtp or postfix config.

Dima

--
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] bsmtp failing to connect to mail server

2015-08-08 Thread Kern Sibbald

  
  
bsmtp does not know how to do TLS.
  
  Best regards,
  Kern
  
  On 08.08.2015 21:23, Jerry Lowry wrote:


  

  Heitor,  Sorry for not saying this in the original text. 
It does the same thing when I specify 'localhost'.

  
  I don't really need 'tls' that is just what gmail is looking
  for when I try to use them as the sending mail server.
  

thanks
  
  
On Sat, Aug 8, 2015 at 5:16 AM, Heitor
  Faria 
  wrote:
  

  

  
  

  

  

  

  Since the move to gmail I
have not been able to get the
bsmtp configuration to work.  I
have tried to use gmail but it
requires tls. 
  

  
  
  Jul 20 10:26:59 distress bacula-dir:
  20-Jul 10:26  Message delivery ERROR:
  Mail 
  prog: bsmtp: bsmtp.c:145 Fatal
  malformed reply from smtp.googlemail.com:
  530 5.7
  .0 Must issue a STARTTLS command
  first. b9sm14093516ioj.6 - gsmtp 
  

  

  

It's pretty easy to set Postfix to use TLS: http://bacula.us/authenticated-mail-sending/

  

  

  
So, I have configured postfix/cyrus
  on the backup server just to send
  email.  The problem I get from bsmtp
  now is that it can not connect to the
  mail server.


[root@kilchis bin]#
/usr/bacula/bin/bsmtp -d 25 -h kilchis.server.com
-f \"\(Bacula\) \\"
-s \"Bacula daemon message\" r...@server.com"
  

  

  

If you pretend to use postfix in this machine
  as your mail relay service, -h (mail server
  address) should be localhost.

  

  

  test message
"
bsmtp: bsmtp.c:338-0 Debug level = 25
bsmtp: bsmtp.c:346-0 host=kilchis.server.com
bsmtp: bsmtp.c:356-0 subject="Bacula
bsmtp: bsmtp.c:432-0 My hostname is:
kilchis
bsmtp: bsmtp.c:456-0 From addr="(Bacula)
bsmtp: bsmtp.c:514-0 Failed to connect
to mailhost kilchis.server.com

  
  I can send mail from the command prompt
  and it works just fine.  
  

What am I missing?

  

Regards,
===
  Heitor
Medrado de Faria - LPIC-III | ITIL-F |  Bacula
  Systems Certified Administrator II
Do
  you need Bacula training? https://www.udemy.com/bacula-backup-software/?couponCode=bacula-list

  +55 61 8268-4220
Site: http://bacula.us FB: heitor.faria 

Re: [Bacula-users] bsmtp failing to connect to mail server

2015-08-08 Thread Ana Emília M . Arruda
Hello Jerry,

Maybe this could help you:
http://www.backupcentral.com/phpBB2/two-way-mirrors-of-external-mailing-lists-3/bacula-25/baculas-bsmtp-and-gmail-90944/

Best regards,
Ana

On Sat, Aug 8, 2015 at 4:23 PM, Jerry Lowry  wrote:

> Heitor,  Sorry for not saying this in the original text.  It does the same
> thing when I specify 'localhost'.
>
> I don't really need 'tls' that is just what gmail is looking for when I
> try to use them as the sending mail server.
>
> thanks
>
> On Sat, Aug 8, 2015 at 5:16 AM, Heitor Faria  wrote:
>
>> Since the move to gmail I have not been able to get the bsmtp
>> configuration to work.  I have tried to use gmail but it requires tls.
>>
>> Jul 20 10:26:59 distress bacula-dir: 20-Jul 10:26  Message delivery
>> ERROR: Mail
>> prog: bsmtp: bsmtp.c:145 Fatal malformed reply from smtp.googlemail.com:
>> 530 5.7
>> .0 Must issue a STARTTLS command first. b9sm14093516ioj.6 - gsmtp
>>
>> It's pretty easy to set Postfix to use TLS:
>> http://bacula.us/authenticated-mail-sending/
>>
>> So, I have configured postfix/cyrus on the backup server just to send
>> email.  The problem I get from bsmtp now is that it can not connect to the
>> mail server.
>>
>> [root@kilchis bin]# /usr/bacula/bin/bsmtp -d 25 -h kilchis.server.com -f
>> \"\(Bacula\) \\" -s \"Bacula daemon message\"
>> r...@server.com"
>>
>> If you pretend to use postfix in this machine as your mail relay service,
>> -h (mail server address) should be localhost.
>>
>> test message
>> "
>> bsmtp: bsmtp.c:338-0 Debug level = 25
>> bsmtp: bsmtp.c:346-0 host=kilchis.server.com
>> bsmtp: bsmtp.c:356-0 subject="Bacula
>> bsmtp: bsmtp.c:432-0 My hostname is: kilchis
>> bsmtp: bsmtp.c:456-0 From addr="(Bacula)
>> bsmtp: bsmtp.c:514-0 Failed to connect to mailhost kilchis.server.com
>>
>> I can send mail from the command prompt and it works just fine.
>>
>> What am I missing?
>>
>> Regards,
>>
>> ===
>> Heitor Medrado de Faria - LPIC-III | ITIL-F |  Bacula Systems Certified
>> Administrator II
>> Do you need Bacula training?
>> https://www.udemy.com/bacula-backup-software/?couponCode=bacula-list
>> +55 61 <%2B55%2061%202021-8260>8268-4220 <%2B55%2061%208268-4220>
>> Site: http://bacula.us FB: heitor.faria
>> 
>>
>> ===
>>
>>
>
>
> --
>
> ___
> Bacula-users mailing list
> Bacula-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/bacula-users
>
>
--
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] bsmtp failing to connect to mail server

2015-08-08 Thread Jerry Lowry
Heitor,  Sorry for not saying this in the original text.  It does the same
thing when I specify 'localhost'.

I don't really need 'tls' that is just what gmail is looking for when I try
to use them as the sending mail server.

thanks

On Sat, Aug 8, 2015 at 5:16 AM, Heitor Faria  wrote:

> Since the move to gmail I have not been able to get the bsmtp
> configuration to work.  I have tried to use gmail but it requires tls.
>
> Jul 20 10:26:59 distress bacula-dir: 20-Jul 10:26  Message delivery ERROR:
> Mail
> prog: bsmtp: bsmtp.c:145 Fatal malformed reply from smtp.googlemail.com:
> 530 5.7
> .0 Must issue a STARTTLS command first. b9sm14093516ioj.6 - gsmtp
>
> It's pretty easy to set Postfix to use TLS:
> http://bacula.us/authenticated-mail-sending/
>
> So, I have configured postfix/cyrus on the backup server just to send
> email.  The problem I get from bsmtp now is that it can not connect to the
> mail server.
>
> [root@kilchis bin]# /usr/bacula/bin/bsmtp -d 25 -h kilchis.server.com -f
> \"\(Bacula\) \\" -s \"Bacula daemon message\"
> r...@server.com"
>
> If you pretend to use postfix in this machine as your mail relay service,
> -h (mail server address) should be localhost.
>
> test message
> "
> bsmtp: bsmtp.c:338-0 Debug level = 25
> bsmtp: bsmtp.c:346-0 host=kilchis.server.com
> bsmtp: bsmtp.c:356-0 subject="Bacula
> bsmtp: bsmtp.c:432-0 My hostname is: kilchis
> bsmtp: bsmtp.c:456-0 From addr="(Bacula)
> bsmtp: bsmtp.c:514-0 Failed to connect to mailhost kilchis.server.com
>
> I can send mail from the command prompt and it works just fine.
>
> What am I missing?
>
> Regards,
> ===
> Heitor Medrado de Faria - LPIC-III | ITIL-F |  Bacula Systems Certified
> Administrator II
> Do you need Bacula training?
> https://www.udemy.com/bacula-backup-software/?couponCode=bacula-list
> +55 61 <%2B55%2061%202021-8260>8268-4220 <%2B55%2061%208268-4220>
> Site: http://bacula.us FB: heitor.faria
> 
> ===
>
>
--
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


Re: [Bacula-users] bsmtp failing to connect to mail server

2015-08-08 Thread Heitor Faria
> Since the move to gmail I have not been able to get the bsmtp configuration to
> work. I have tried to use gmail but it requires tls.

> Jul 20 10:26:59 distress bacula-dir: 20-Jul 10:26 Message delivery ERROR: Mail
> prog: bsmtp: bsmtp.c:145 Fatal malformed reply from smtp.googlemail.com : 530
> 5.7
> .0 Must issue a STARTTLS command first. b9sm14093516ioj.6 - gsmtp

It's pretty easy to set Postfix to use TLS: 
http://bacula.us/authenticated-mail-sending/ 

> So, I have configured postfix/cyrus on the backup server just to send email. 
> The
> problem I get from bsmtp now is that it can not connect to the mail server.

> [root@kilchis bin]# /usr/bacula/bin/bsmtp -d 25 -h kilchis.server.com -f
> \"\(Bacula\) \< no-re...@edt.com \>\" -s \"Bacula daemon message\"
> r...@server.com "

If you pretend to use postfix in this machine as your mail relay service, -h 
(mail server address) should be localhost. 

> test message
> "
> bsmtp: bsmtp.c:338-0 Debug level = 25
> bsmtp: bsmtp.c:346-0 host= kilchis.server.com
> bsmtp: bsmtp.c:356-0 subject="Bacula
> bsmtp: bsmtp.c:432-0 My hostname is: kilchis
> bsmtp: bsmtp.c:456-0 From addr="(Bacula)
> bsmtp: bsmtp.c:514-0 Failed to connect to mailhost kilchis.server.com

> I can send mail from the command prompt and it works just fine.

> What am I missing?

Regards, 
=== 
Heitor Medrado de Faria - LPIC-III | ITIL-F | Bacula Systems Certified 
Administrator II 
Do you need Bacula training? 
https://www.udemy.com/bacula-backup-software/?couponCode=bacula-list 
+55 61 8268-4220 
Site: http://bacula.us FB: heitor.faria 
=== 
--
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users


[Bacula-users] bsmtp failing to connect to mail server

2015-08-07 Thread Jerry Lowry
All,

I have recently setup two separate bacula servers on two subnets.  They
were using one server and going through the firewall for one of the
subnets.  The previous configuration worked well but for security reasons
and speed I separated them.
Along with this change the company decided to move from an inhouse email
server to gmail.

Since the move to gmail I have not been able to get the bsmtp configuration
to work.  I have tried to use gmail but it requires tls.

Jul 20 10:26:59 distress bacula-dir: 20-Jul 10:26  Message delivery ERROR:
Mail
prog: bsmtp: bsmtp.c:145 Fatal malformed reply from smtp.googlemail.com:
530 5.7
.0 Must issue a STARTTLS command first. b9sm14093516ioj.6 - gsmtp

So, I have configured postfix/cyrus on the backup server just to send
email.  The problem I get from bsmtp now is that it can not connect to the
mail server.

[root@kilchis bin]# /usr/bacula/bin/bsmtp -d 25 -h kilchis.server.com -f
\"\(Bacula\) \\" -s \"Bacula daemon message\"
r...@server.com"
test message
"
bsmtp: bsmtp.c:338-0 Debug level = 25
bsmtp: bsmtp.c:346-0 host=kilchis.server.com
bsmtp: bsmtp.c:356-0 subject="Bacula
bsmtp: bsmtp.c:432-0 My hostname is: kilchis
bsmtp: bsmtp.c:456-0 From addr="(Bacula)
bsmtp: bsmtp.c:514-0 Failed to connect to mailhost kilchis.server.com

I can send mail from the command prompt and it works just fine.

What am I missing?

thanks
--
___
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users