i want make my linux server to receive mail from an host (LAN but if possible through Internet) and than relay to Gmail.

I made the second part with ssmtp let the server send mail through Gmail using

ssmtp email@address.com < msg.txt

The other part is needed for example for use program that integrate some smtp alarm function. The majority of this program doesn't support sending with credential so i need to pass through a server that doesn't need it.

The final result must be:

Host_with_smtp_alarm_function -> server_smtp -> Gmail_server

How can i make this work?


My host have a mask to fill with smtp server info. Filling with ip and port resulting in a "impossible to connect" The linux server are not listening for a connection, so send but not receive.

netstat -a confirm that.


Question is not clear:

If you wish send e-mail to google - it's completly enought to set alias in postfix pointed to google account. For example:

account: account@gmail.com

It will forward any mail sent to account@$localdomail to account@gmail.com

Alternativly - if you wish forward e-mail via google (you wish to send e-mail to internet using gmail account, but to to gmail) - you must configure smtp authentication. Example for postfix are on http://www.postfix.org/SASL_README.html#client_sasl_enable

  • add edit on the post – smark91 Feb 10 '15 at 16:35
  • 1
    Resolved using postfix. Thank you! – smark91 Feb 11 '15 at 8:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.