LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   evolution setup assistant in ubuntu (https://www.linuxquestions.org/questions/linux-newbie-8/evolution-setup-assistant-in-ubuntu-823461/)

linuxlover.chaitanya 08-05-2010 01:02 AM

Find out the permissions on the postfix directory.

Xanios 08-05-2010 01:04 AM

hmm, check out my #150 post :X sorry

linuxlover.chaitanya 08-05-2010 01:07 AM

Quote:

Originally Posted by Xanios (Post 4056372)
Hmm, when i was trying to delete the file:

Code:

xanios@ubuntu:~$ rm -r /etc/postfix/sasl_passwd
rm: remove write-protected regular file `/etc/postfix/sasl_passwd'? [i pressed 'enter' here]

in my previous sasl_passwd file, the password is my REAL password for gmail account. that should be okay right? or should i just put 'password' instead?

You can stop postfix service and then delete the file. And then create file using echo command and you will need your real gmail account password to authenticate.

Xanios 08-05-2010 01:19 AM

stopped postfix and tried to delete the file, it still remains.

Xanios 08-05-2010 01:21 AM

there's an additional sasl_password file i had, do i have to remove that? that file won't affect the way sasl_passwd works?

Xanios 08-05-2010 01:48 AM

i realised one thing:

Code:

xanios@ubuntu:~$ telnet smtp.gmail.com 587
Trying 74.125.127.109...
telnet: Unable to connect to remote host: Connection refused

Is it because of this i keep get connection refused?
how to resolve..i'm still looking

linuxlover.chaitanya 08-05-2010 01:54 AM

http://ubuntu-tutorials.com/2008/11/...-smtpgmailcom/

linuxlover.chaitanya 08-05-2010 01:56 AM

I can telnet to smtp.gmail.com on 587 port successfully. You could have been denied for your excessive requests.

Xanios 08-05-2010 02:02 AM

Excessive requests? x_x

in the link they used relayhost = [smtp.gmail.com]:587, should i just change back to that?

add on:

tried that. still connection refused.

maybe my port 587 is blocked.

Xanios 08-05-2010 02:22 AM

i added this to master.cf:

Code:

#628      inet  n      -      -      -      -      qmqpd
pickup    fifo  n      -      -      60      1      pickup
cleanup  unix  n      -      -      -      0      cleanup
qmgr      fifo  n      -      n      300    1      qmgr
#qmgr    fifo  n      -      -      300    1      oqmgr
tlsmgr    unix  -      -      -      1000?  1      tlsmgr
rewrite  unix  -      -      -      -      -      trivial-rewrite
bounce    unix  -      -      -      -      0      bounce
defer    unix  -      -      -      -      0      bounce
trace    unix  -      -      -      -      0      bounce
verify    unix  -      -      -      -      1      verify
flush    unix  n      -      -      1000?  0      flush
proxymap  unix  -      -      n      -      -      proxymap
proxywrite unix -      -      n      -      1      proxymap
smtp      unix  -      -      -      -      -      smtp
587      inet  n      -      n      -      -      smtpd

the one that is in bold. saw it on the web that by adding that line would open a port 587, still my telnet to 587 failed.

stumped.

linuxlover.chaitanya 08-05-2010 02:25 AM

You can change back. But it would not matter. Port number is at their end and not yours. And I can telnet from my end. Google has policy where in they treat some number of requests in a particular amount of time to be spam. So you have to limit that. Not just google but most of the SMTP relays have relay limits per user or per IP. After that the requests are either banned or termed spam. This is done to prevent spams and bulk mails.

linuxlover.chaitanya 08-05-2010 02:26 AM

No you are not getting the point. It not the port at your end. It is the port at googles end.

Xanios 08-05-2010 02:26 AM

But how to limit that?x_x

linuxlover.chaitanya 08-05-2010 02:30 AM

You do not limit that. Its them who limit the requests for spam and bulk mailing. You can not control the server at their end and neither can you do anything about the policies. Those policies are there to prevent their servers from being misused for spamming.

Xanios 08-05-2010 02:31 AM

Oh okay.
So, is there no other way to solve the error?
Connection refused.

linuxlover.chaitanya 08-05-2010 02:34 AM

You can use other SMTP relays those are free and do not need authentication for relaying. You can search google for such. Or else you can use other mail services that you may have account with. Using a free relay is one option but I have never used one of those so I can not guarantee if mails from free relays are treated secure or spams.

Xanios 08-05-2010 02:43 AM

okay.. this is just so weird. at home when i tried the same thing, i got the error: "Authentication Required". For this how to resolve that? post #140.

Xanios 08-05-2010 02:55 AM

X_X

Xanios 08-05-2010 03:23 AM

sorry for keep posting x_x

earlier when i created the CA Certificate, i issued this command in terminal:

Code:

cat /etc/ssl/certs/Thawte_Premium_Server_CA.pem >> cacert.pem
i think so. but i guess that also won't cause the error right? i'm just baffled as to why the error i got at home and in school is totally different when both settings are the same? i'm using the same file for both x.x

linuxlover.chaitanya 08-05-2010 03:48 AM

There is no requirement for creating certificate. I do not have one created myself. I have no idea why you are facing so many issues for this.

Xanios 08-05-2010 03:55 AM

i have no idea too...

linuxlover.chaitanya 08-05-2010 04:02 AM

I think you should give it a try starting from scratch. Remove postfix. delete all the related files and directories and reinstall and reconfigure.

Xanios 08-05-2010 04:10 AM

i shall see how..

by the way, what do you configured your postfix as? there are options like 'internet', 'satellite mail system' etc. i chose satellite. i wonder if that affects the way it works

linuxlover.chaitanya 08-05-2010 04:12 AM

I have not used postfix as such. What I used was Zimbra which is based on postfix.

Xanios 08-05-2010 08:22 AM

I see.
Hey by the way, are there any ways to solve this kind of error:

Code:

Aug  5 06:15:04 ubuntu postfix/smtp[4231]: 1AA8540A58: to=<xanios@server.com>, relay=gmail-smtp-msa.l.google.com[74.125.155.109]:25, delay=1.6, delays=0.05/0.03/1.4/0.19, dsn=5.5.1, status=bounced (host gmail-smtp-msa.l.google.com[74.125.155.109] said: 530-5.5.1 Authentication Required. Learn more at                              530 5.5.1 http://mail.google.com/support/bin/answer.py?answer=14257 g4sm354955wae.2 (in reply to MAIL FROM command))
no connection refused error, but authentication required.

linuxlover.chaitanya 08-06-2010 12:05 AM

See the link in the error. Also check with the sasl_passwd file if your user and password are correct and that it has been hashed and the same file is used in main.cf.

Xanios 08-06-2010 12:56 AM

my user and password are correct. it has been hashed too.

linuxlover.chaitanya 08-06-2010 01:00 AM

Then check all the parameter options in main.cf that relate to authenticating to external relay. What authentication method are you using? What options and all. Make sure you are not sending password as plain text.

Xanios 08-06-2010 01:10 AM

Authentication method?

Quote:

Make sure you are not sending password as plain text.
you mean in sasl_passwd where i declared user@gmail.com=password < this cannot be plain text?

linuxlover.chaitanya 08-06-2010 02:10 AM

The password will be stored in plain text in the file before it is hashed. But how it passes over the network to the server is what I am talking about.
smtp_sasl_security_options=noanonymous,noplaintext is what I am talking about.
Also make sure tls method is enabled.
I can not think of anything else.

Xanios 08-06-2010 02:18 AM

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


linuxlover.chaitanya 08-06-2010 02:30 AM

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


Xanios 08-06-2010 02:48 AM

Hmm okay.
i shall try it again soon. if cannot work, then i shall give up i guess.
really ran out of idea lol

linuxlover.chaitanya 08-06-2010 04:16 AM

You need not give up. Instead remove everything and start off of scratch and fresh and use the links that I have given.

Xanios 08-06-2010 09:53 AM

HEYYYYY!
GOOD NEWS!! i'm able to send emails now!!
i changed here and there, trial and error, and it works nowwwww :D

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

linuxlover.chaitanya 08-07-2010 01:26 AM

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.

Xanios 08-07-2010 05:38 AM

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:)

EricTRA 08-08-2010 02:22 PM

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

Xanios 08-08-2010 10:04 PM

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^^

linuxlover.chaitanya 08-09-2010 12:23 AM

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 12:22 PM.