LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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


Reply
  Search this Thread
Old 08-06-2010, 02:18 AM   #181
Xanios
Member
 
Registered: Jul 2010
Posts: 216

Original Poster
Rep: Reputation: 30

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.
 
Old 08-06-2010, 02:30 AM   #182
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
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
 
Old 08-06-2010, 02:48 AM   #183
Xanios
Member
 
Registered: Jul 2010
Posts: 216

Original Poster
Rep: Reputation: 30
Hmm okay.
i shall try it again soon. if cannot work, then i shall give up i guess.
really ran out of idea lol
 
Old 08-06-2010, 04:16 AM   #184
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
You need not give up. Instead remove everything and start off of scratch and fresh and use the links that I have given.
 
Old 08-06-2010, 09:53 AM   #185
Xanios
Member
 
Registered: Jul 2010
Posts: 216

Original Poster
Rep: Reputation: 30
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.
 
Old 08-07-2010, 01:26 AM   #186
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
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.
 
Old 08-07-2010, 05:38 AM   #187
Xanios
Member
 
Registered: Jul 2010
Posts: 216

Original Poster
Rep: Reputation: 30
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.
 
Old 08-08-2010, 02:22 PM   #188
EricTRA
LQ Guru
 
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
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
 
Old 08-08-2010, 10:04 PM   #189
Xanios
Member
 
Registered: Jul 2010
Posts: 216

Original Poster
Rep: Reputation: 30
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^^
 
Old 08-09-2010, 12:23 AM   #190
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Gurgaon, India
Distribution: Cent OS 6/7
Posts: 4,631

Rep: Reputation: Disabled
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Migration Assistant In Ubuntu 9.04 LXer Syndicated Linux News 0 01-08-2009 01:40 PM
not throws evolution setup assistant dissident_goodchild Linux - Software 0 11-16-2007 09:00 PM
Evolution pppoe setup in Ubuntu won't work with dsl Thane Ubuntu 1 08-16-2006 01:11 PM
evolution mail setup hariiyer Linux - Networking 1 03-03-2006 07:41 AM
Evolution - problems after first setup jburford Linux - Software 2 09-08-2002 04:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration