Sending Email using SMTP of different machine


(saurabh jaiswal) #1

Hello,
I have setup SMTP server on graylog machine and I am able to send alert mails using that smtp server giving localhost in graylog configurations
but instead of that I want use SMTP server kept on any other remote machine in same network.
so that there will not be any need to setup smtp on all graylog machines.

I tried replacing localhost with hostname of machine where smtp already setup n working. but not working for me, any suggestions on settings.

Below are my server.config settings on graylog machine

transport_email_enabled = true
transport_email_from_email = XXX.XXX@gmail.com
transport_email_from_name = Graylog2
transport_email_hostname = localhost
transport_email_port = 25
transport_email_protocol = smtp
transport_email_subject_prefix = [graylog2]
transport_email_use_auth = false
transport_email_use_ssl = false
transport_email_use_tls = false
transport_email_web_interface_url = http://orch-gl-server-dev-elb-XXX.ap-southeast-1.elb.amazonaws.com/
web_enable = true
web_endpoint_uri = http://orch-gl-server-dev-elb-XXX.ap-southeast-1.elb.amazonaws.com/api/
web_listen_uri = http://0.0.0.0:9000/

Thanks
Saurabh


(Jan Doberstein) #2

without knowing your details - mean the details of your SMTP Server - we can’t advice how you should configure that.

You should simple replace the localhost configuration and adjust the authentication and ssl/tls settings.


(saurabh jaiswal) #3

@jan
PFB mail settings( SMTP) if you can suggest anything to change based on below details

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = localhost
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = $myhostname, orch-gl-server-dev-1.internal.orch.com, localhost.internal.orch.com, , localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = loopback-only
inet_protocols = all

(Jochen) #4

What does that mean? What warning or error message do you get?


(saurabh jaiswal) #5

this means I have given hostname of smtp server on graylog configuation that was not working,

but if I install SMTP in graylog machine and give hostname=localhost , than only email was working.
I want to use SMTP install in another machine


(Jochen) #6

What was the specific configuration?
What warning or error message do you get?


(system) #7

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.