Operating System - HP-UX
1828621 Members
1696 Online
109983 Solutions
New Discussion

sending emails using authentication

 
Ahmed_41
Super Advisor

sending emails using authentication

Dear all,

I used to use mailx command to send emails when i get alerts in HPOV applications using a mail server that doesnot require authentication, now this mail server is changed and it seems to require authentication, and this way when i try to send mail using mailx i find the mail server log full of authentication alarms, can someone tell me how to reconfigure my HPUX machine as a mail client for a mail server working with authentication ?

Thanks
15 REPLIES 15
Bejoy C Alias
Respected Contributor

Re: sending emails using authentication

For sending mails using to a authenticated server , u need to configure some MTA like sendmail . If u want to use sendmail to send authenticated mails , then u need to set
O DefaultAuthInfo=/etc/mail/default-auth-info in ur sendmail.cf file and in this file u should enter the username , passwd etc used for authentication to the server . Then u can send mails using sendmail to an authenticated server .
Be Always Joy ......
Ahmed_41
Super Advisor

Re: sending emails using authentication

Dear Bejoy,

Thanks for your reply, i am not sure if i got you correctly or not.
the case here is that i am using mailx to send emails when a certain alert occur in HPOV, so i am not sure how can i use sendmail instead.
while this is what happens when i try to send emails

# telnet qmail 25
Trying...
Connected to qmail.
Escape character is '^]'.
220 mail.citystars-com.com
HELO
250 Hello. Pleased to meet you
MAIL FROM: root@ovsv2noc2rk1
550 The address is not valid...


while it used to work before
Bejoy C Alias
Respected Contributor

Re: sending emails using authentication

"now this mail server is changed and it seems to require authentication" . what does it mean . I think the mail server is not under ur maintenance . If not then probably they may have configured the server to reject mails which does not have a proper domain address , like 'me@kbjsdcavshd' , try using a valid from address like 'abc@yahoo.com' . If this doesnt work then try 'mail from:' , because some mail servers does not accept mails whose from addresses are without the '< >' symbols . Is the mail server is inside ur premises or it is an isp server ?
Be Always Joy ......
Ahmed_41
Super Advisor

Re: sending emails using authentication

the mail server is under my client control, and i can ask him to test and modify as we need to get this thing to work.
Bejoy C Alias
Respected Contributor

Re: sending emails using authentication

U have not mentioned whether the last tips worked or not .
Be Always Joy ......
Matti_Kurkela
Honored Contributor

Re: sending emails using authentication

Mailx might deliver local mails by itself (or using just "mail" as a helper process), but when sending email to another server, mailx ends up using sendmail to push the message through. So, you're probably already using sendmail. You might not need to change anything else, just put the default authentication information to the sendmail configuration on your server.

The error message was:
MAIL FROM: root@ovsv2noc2rk1
550 The address is not valid...

This error message suggests that the receiving server is now more picky in checking that the sender address is valid. (You can probably thank the email spammers for that, but I digress...)

Looks like you're using "ovsv2noc2rk1" as your server name. In email context, it really should be a fully-qualified domain name (FQDN), as in "ovsv2noc2rk1.yourcompany.com" or whatever domain you have. If these mails are for internal use only, you can get away with "ovsv2noc2rk1.internal" or some other fake domain, as long as your mail server knows about the fake domain too.

The important thing is, if you send email from a certain IP address with a sender hostname "ovsv2noc2rk1.whatever", the mail server host will check if the claimed name exists in the DNS. If not, you get "The address is not valid" or a similar error message.
MK
Ahmed_41
Super Advisor

Re: sending emails using authentication

OK Matti,

thanks, my main problem now is, how to make my machine name turn to be a fully qualified named with domain name without changing the machine name, specially that i am using hosts file.

IE: i wanna change my machine from x to x.y.z ?? how can i do this and from where, ? specially that i have NNM running on the machine and i dont want to change the name, i just only need to change the name that appears when i send an email.

Thanks
Stephen Keane
Honored Contributor

Re: sending emails using authentication

Can you append the domain entry in /etc/resolv.conf to your hostname?
Ahmed_41
Super Advisor

Re: sending emails using authentication

will this change the whole machine name or not ? since i have NNM running on the machine and if i changed the machine name i might face a risk of NNM not working

so, when i append this in the resolv.conf file, will this change the machine name ?

thanks
Ahmed_41
Super Advisor

Re: sending emails using authentication

Beside, i cannot fina a resolv.conf file on my machine, i am not using DNS, i am using hosts file for resolution.

?? in need yur input plz

thanks
Stephen Keane
Honored Contributor

Re: sending emails using authentication

The idea was to use a script to extract the domain name from resolv.conf and append the user name to it to get the fully qualified domain name - not to edit /etc/resolv.conf. But as you don't have /etc/resolv.conf that isn't going to work. Do you know what domain your machine is in?
Ahmed_41
Super Advisor

Re: sending emails using authentication

yes i know the domain,
is there any workaround that i can do in order to use the FDQN in the emails without changing the machine name ?

Thanks
Stephen Keane
Honored Contributor

Re: sending emails using authentication

What about /etc/mail/aliases ?
Ahmed_41
Super Advisor

Re: sending emails using authentication

what about it ??? can it solve the problem and how ??? just tell me the key point i will do it test and tell u if it worked or not

Bejoy C Alias
Respected Contributor

Re: sending emails using authentication

Set Dj as ur FQDN in sendmail.cf file.
eg.
Djmymachine.mydomain.com
Be Always Joy ......