Gmail forwarding with YAST

Hello people,

I have been 2 days busy configuring postfix to send emails via my gmail account.
However I tried all the solutions and have givenup.
Now I want to try it with Yast, but services don’t start even.
Does anybody have good documentation about this process?
thx.

CHeers

Hi
I have one system (a vm) using gmail forwarding, never used YaST;

http://mhawthorne.net/posts/postfix-configuring-gmail-as-relay.html

(Note use systemctl instead of the init command)

From memory there was also a permissions issue with the postfix directory, but been awhile since I configured the vm…

What sort of errors in the logs?

I have removed postfix, because it was hopeless after spending so many hours trying out everything

now I have mail installed with Yast and seems to be using sendmail
got couple of erros, but solved them, and now I have just one error:

relay=smtp.gmail.com, dsn=5.0.0, stat=Service unavailable

what could this be? DNS problem?
this is a standalone server and I need to send emails from that system, we don’t have an email server, so I figured I would use gmail

I found another error and this might be the reason:

sendmail[17087]: STARTTLS=client, relay=smtp.gmail.com, version=TLSv1/SSLv3, verify=FAIL, cipher=RC4-SHA, bits=128/128

verify= fail
would this suggest authentication problems?

Hi
Your using a FQDN in your hosts file and it’s also assigned to the loopback address. eg;


127.0.0.2 server.full.domain.name server

the server is not part of any domain, there is no domain configured, I did put a fictional domain name to stop certain errors
this is a standalone server , there are no domains configured

Hi
Not a site or localhost domain though?

In sasl_passwd you have;


[smtp.gmail.com]:587  a_valid_user_account@gmail.com:<password>

I am not using postfix anymore, this file has bene deleted
WIthin Yast -Network Services- Mail - I have put the credentials

I found this during extensive debugging:

>>> AUTH PLAIN dm9vcmJ1cmcyOEBnbWFpbC5jb20Adm9vcmJ1cmcyOEBnbWFpbC5jb20AU1VsbGl2YW4yMDE1IQ==
535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8 http://support.google.com/mail/bin/answer.py?answer=14257 ps4sm2099675wjc.31 - gsmtp

seems usernam and password are not accepted, even when they are filled in with yast and i did check the password

On Mon 23 Mar 2015 04:46:01 PM CDT, ecanmaster wrote:

I found this during extensive debugging:

>>> AUTH PLAIN
dm9vcmJ1cmcyOEBnbWFpbC5jb20Adm9vcmJ1cmcyOEBnbWFpbC5jb20AU1VsbGl2YW4yMDE1IQ==
535-5.7.8 Username and Password not accepted. Learn more at
535 5.7.8 http://support.google.com/mail/bin/answer.py?answer=14257
ps4sm2099675wjc.31 - gsmtp

seems usernam and password are not accepted, even when they are filled
in with yast and i did check the password

ecanmaster;2701117 Wrote:
> I am not using postfix anymore, this file has bene deleted
> WIthin Yast -Network Services- Mail - I have put the credentials

Hi
Did you create the sasl_password file?

Anyway, if you go back to postfix, all I did was;

  1. Modify /etc/postfix/main.cf

myhostname = <your fqdn>
relayhost = [smtp.gmail.com]:587
smtp_sasl_auth_enable = yes
smtp_use_tls = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd

  1. Add the following to /etc/postfix/sasl_passwd

[smtp.gmail.com]:587 <gmailaccountname>:<password>

then run;

postmap hash:/etc/postfix/sasl_passwd

  1. Enable tlsmgr line in master.cf as in remove the #

  2. Open a terminal and tail the log


journalctl -f

  1. Open another terminal and run;

systemctl restart postfix.service

mailx -s "Test Email" <your_email>
Test

..

After the period you should see EOT and in the log the mail has been sent…


Cheers Malcolm °¿° LFCS, SUSE Knowledge Partner (Linux Counter #276890)
SUSE Linux Enterprise Desktop 12 GNOME 3.10.1 Kernel 3.12.38-44-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!

Hello Malcolm,

I did use first postfix, but then switched to the SUSE Yast email server configuration.
This didn’t work either, but after doing debugging, it seemed that gmail was blocking the connection !!!
SO probably my postfix solution worked, but gmail was blocking it.
After setting the security on gmail low, it started to communicate to gmail.
I don’t have the link anymore, but you have app security settings on your gmail account.

I could send manually emails from the server.
Now I have installed OSSEC HIDS and the program needs to send email alerts.
THis didn’t work, but after filled 127.0.0.1 in the smtp server section of ossec.conf (instead of smtp.gmail.com) it worked !!!
Seems that OSSEC HIDS doesn’t support gmail because of TLS and authentication, but now it will use the email relay agent.

So it’s done …