Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to
LinuxQuestions.org , a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free.
Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please
contact us . If you need to reset your password,
click here .
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a
virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month.
Click here for more info.
08-06-2010, 02:18 AM
#181
Member
Registered: Jul 2010
Posts: 216
Original Poster
Rep:
Oh ok. I see. I've already set it as noplaintext. tls method is set to yes too. Hmm.
Code:
xanios@ubuntu:~$ postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
disable_dns_lookups = yes
inet_interfaces = all
inet_protocols = ipv4
mailbox_size_limit = 0
mydestination = smtp.gmail.com, $myhostname, $mydomain, localhost.localdomain, localhost
myhostname = ubuntu
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost = gmail-smtp-msa.l.google.com:587
smtp_cname_overrides_servername = no
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous, noplaintext
smtp_sasl_tls_security_options = noanonymous, noplaintext
smtp_tls_CAfile = /etc/postfix/cacert.pem
smtp_tls_cert_file = /etc/postfix/FOO-cert.pem
smtp_tls_key_file = /etc/postfix/FOO-key.pem
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtp_use_tls = yes
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
Last edited by Xanios; 08-06-2010 at 02:19 AM .
08-06-2010, 02:30 AM
#182
Senior Member
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631
Rep:
I can not think of anything then. You can just restart the postfix and see if it works. Else wait for someone who has good experience with it. I have never used postfix as such. So this what I can help you with. You could just remove everything and check with it.
If this can help. Configuration at my Zimbra FOSS server.
Code:
alias_maps = hash:/etc/aliases
bounce_queue_lifetime = 5d
broken_sasl_auth_clients = yes
command_directory = /opt/zimbra/postfix/sbin
config_directory = /opt/zimbra/postfix-2.6.2.2z/conf
content_filter = smtp-amavis:[127.0.0.1]:10024
daemon_directory = /opt/zimbra/postfix/libexec
disable_dns_lookups = yes
header_checks =
in_flow_delay = 1s
lmtp_connection_cache_destinations =
lmtp_connection_cache_time_limit = 4s
lmtp_host_lookup = dns
local_header_rewrite_clients = permit_mynetworks,permit_sasl_authenticated
mail_owner = postfix
mailbox_size_limit = 0
mailq_path = /opt/zimbra/postfix/sbin/mailq
manpage_directory = /opt/zimbra/postfix/man
maximal_backoff_time = 4000s
message_size_limit = 10240000
minimal_backoff_time = 300s
mydestination = localhost
myhostname = mailserver.ib.com.local
mynetworks = 127.0.0.0/8 192.168.2.0/24
newaliases_path = /opt/zimbra/postfix/sbin/newaliases
propagate_unmatched_extensions = canonical
queue_directory = /opt/zimbra/data/postfix/spool
queue_run_delay = 300s
recipient_delimiter =
relayhost = smtpout.secureserver.net:80
sender_canonical_maps = proxy:ldap:/opt/zimbra/conf/ldap-scm.cf
sendmail_path = /opt/zimbra/postfix/sbin/sendmail
setgid_group = postdrop
smtp_cname_overrides_servername = no
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/opt/zimbra/conf/relay_password
smtp_sasl_security_options = noanonymous
smtp_use_tls = no
smtpd_client_restrictions = reject_unauth_pipelining
smtpd_data_restrictions = reject_unauth_pipelining
smtpd_helo_required = yes
smtpd_recipient_restrictions = reject_non_fqdn_recipient, permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination, reject_unlisted_recipient, reject_invalid_hostname, reject_non_fqdn_sender, permit
smtpd_reject_unlisted_recipient = no
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = no
smtpd_tls_auth_only = no
smtpd_tls_cert_file = /opt/zimbra/conf/smtpd.crt
smtpd_tls_key_file = /opt/zimbra/conf/smtpd.key
smtpd_tls_loglevel = 1
smtpd_tls_security_level = may
transport_maps = proxy:ldap:/opt/zimbra/conf/ldap-transport.cf
virtual_alias_domains = proxy:ldap:/opt/zimbra/conf/ldap-vad.cf
virtual_alias_maps = proxy:ldap:/opt/zimbra/conf/ldap-vam.cf
virtual_mailbox_domains = proxy:ldap:/opt/zimbra/conf/ldap-vmd.cf
virtual_mailbox_maps = proxy:ldap:/opt/zimbra/conf/ldap-vmm.cf
virtual_transport = error
08-06-2010, 02:48 AM
#183
Member
Registered: Jul 2010
Posts: 216
Original Poster
Rep:
Hmm okay.
i shall try it again soon. if cannot work, then i shall give up i guess.
really ran out of idea lol
08-06-2010, 04:16 AM
#184
Senior Member
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631
Rep:
You need not give up. Instead remove everything and start off of scratch and fresh and use the links that I have given.
08-06-2010, 09:53 AM
#185
Member
Registered: Jul 2010
Posts: 216
Original Poster
Rep:
HEYYYYY!
GOOD NEWS!! i'm able to send emails now!!
i changed here and there, trial and error, and it works nowwwww
BUT, one thing is.
i want
nagios to send email notifications to my gmail account when the services are down .
howww to go about doing that?
there is this email commands in commands.cfg:
Code:
# 'notify-host-by-email' command definition
define command{
command_name notify-host-by-email
command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\nHost: $HOSTNAME$\nState: $HOSTSTATE$\nAddress: $HOSTADDRESS$\nInfo: $HOSTOUTPUT$\n\nDate/Time: $LONGDATETIME$\n" |/usr/bin/mailx -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$
}
# 'notify-service-by-email' command definition
define command{
command_name notify-service-by-email
command_line /usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: $SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: $SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional Info:\n\n$SERVICEOUTPUT$" | /usr/bin/mailx -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
}
that shows the format of the email that will be sent.
i want nagios to send email notifications to me when the services of any servers that i'm monitoring go down.
how? (:
thank you
Last edited by Xanios; 08-06-2010 at 09:59 AM .
08-07-2010, 01:26 AM
#186
Senior Member
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631
Rep:
I have never used Nagios. I would not be able to help you out on this matter. By the way, if you could post your configurations that are working, other members might get help out of it.
08-07-2010, 05:38 AM
#187
Member
Registered: Jul 2010
Posts: 216
Original Poster
Rep:
Hi,
Oh okay, i see.
Guess i will let this thread remain as unsolved until i gotten this Nagios thing sorted out. Hmm.
Here's my
main.cf file:
Code:
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
disable_dns_lookups = yes
inet_interfaces = all
inet_protocols = ipv4
mailbox_size_limit = 0
mydestination = smtp.gmail.com, $myhostname, $mydomain, localhost.localdomain, localhost
myhostname = ubuntu
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost = [smtp.gmail.com]:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = noanonymous
smtp_tls_CAfile = /etc/postfix/cacert.pem
smtp_tls_cert_file = /etc/postfix/FOO-cert.pem
smtp_tls_key_file = /etc/postfix/FOO-key.pem
smtp_tls_security_level = may
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_sasl_security_options = noanonymous
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
my
resolv.conf file, it remains as its default values and it works. strangely enough.
add on:
it works already.
thank you for your patience and guidance all along.
appreciated it, really
Last edited by Xanios; 08-07-2010 at 06:43 AM .
08-08-2010, 02:22 PM
#188
LQ Guru
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Hello Xanios,
Glad you got it working. I was going to post about the Nagios mail functionality but since you already got it working, no need for that. Great job!!
Kind regards,
Eric
08-08-2010, 10:04 PM
#189
Member
Registered: Jul 2010
Posts: 216
Original Poster
Rep:
Hello Eric,
haha =) thanks to you and Chaitanya that i'm able to get it working(:
thank you to the both of you. really appreciated the help given(:
Nagios mail functionality?o_o
actually you can post it out, maybe it would be able to help other members,
and i can learn more things too! ^_^
but well, never mind haha (:
have a nice day^^
08-09-2010, 12:23 AM
#190
Senior Member
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631
Rep:
Thats good that you got it working on your own. And its better even that you have posted the solution. This helps other members coming along for similar issues.
All times are GMT -5. The time now is 04:08 AM .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know .
Latest Threads
LQ News