Sendmail with remote smtp

Hi

I have a VPS which have a website on it. I purchased a mail server in register.com and my domain is also registered in register.com

Now I want to use register.com's smtp mail server in my VPS to send authenticated email which I have user/pass in register.com's mail server. it's mail.mydomain.com which is hosted in register.com

I tried to install sendmail and I configured php's php.ini to use sendmail. Till now it was OK.

I did some configurations on sendmail.mc and sendmail.cf and I corrupted them, then I deleted /etc/mail

Then I did

apt-get remove sendmail

and then

apt-get install sendmail

again I don't have anything in /etc/mail

So now I can't reconfigure it.

Now please tell me:

a) how to install (reinstall) sendmail to have default configs in /etc/mail
b) How to configure sendmail to use remote SMTP server with user/pass I'll provide.

Thanks from now
LVL 17
CSecurityAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

The--CaptainCommented:
have you installed all of the following packages:

sendmail-base
sendmail-bin
sendmail-cf
sendmail

As for question 2, I use the following line in my sendmail.cf

DSsmtp.myisp.com

(substitute smtp.myisp.com for your own SMTP forwarder)

and use the following line in /etc/mail/access

AuthInfo:smtp.myisp.com "U:myusername" "P:mypassword" "M:LOGIN PLAIN"

(substitute smtp.myisp.com for your own SMTP forwarder, myusername for your actual username, and mypassword for your actual password - you may also need to adjust the authentication mechanisms from LOGIN and PLAIN to something that is supported by your provider).

Cheers,
-Jon
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
CSecurityAuthor Commented:
I did that, but now I'm receiving this:

Apr  8 09:17:23 localhost sm-mta[2672]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon MTA-v4: cannot bind: Cannot assign requested address
Apr  8 09:17:23 localhost sm-mta[2672]: daemon MTA-v4: problem creating SMTP socket
Apr  8 09:17:28 localhost sm-mta[2672]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon MTA-v4: cannot bind: Cannot assign requested address
Apr  8 09:17:28 localhost sm-mta[2672]: daemon MTA-v4: problem creating SMTP socket
Apr  8 09:17:33 localhost sm-mta[2672]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon MTA-v4: cannot bind: Cannot assign requested address
Apr  8 09:17:33 localhost sm-mta[2672]: daemon MTA-v4: problem creating SMTP socket
Apr  8 09:17:38 localhost sm-mta[2672]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon MTA-v4: cannot bind: Cannot assign requested address
Apr  8 09:17:38 localhost sm-mta[2672]: daemon MTA-v4: problem creating SMTP socket
Apr  8 09:17:43 localhost sm-mta[2672]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon MTA-v4: cannot bind: Cannot assign requested address
Apr  8 09:17:43 localhost sm-mta[2672]: daemon MTA-v4: problem creating SMTP socket
Apr  8 09:17:43 localhost sm-mta[2672]: NOQUEUE: SYSERR(root): opendaemonsocket: daemon MTA-v4: server SMTP socket wedged: exiting
0
CSecurityAuthor Commented:
I've pasted those texts from /var/log/mail.log
0
Newly released Acronis True Image 2019

In announcing the release of the 15th Anniversary Edition of Acronis True Image 2019, the company revealed that its artificial intelligence-based anti-ransomware technology – stopped more than 200,000 ransomware attacks on 150,000 customers last year.

CSecurityAuthor Commented:
Also I get this in syslog:

Apr  8 09:21:27 localhost sendmail[2683]: o389LRxO002683: to=xxxxxxx, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30312, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]


0
CSecurityAuthor Commented:
Also sometimes I see an email in spam folder from root <root@localhost.localdomain>

0
CSecurityAuthor Commented:
I found solution myself
0
CSecurityAuthor Commented:
I got a new problem, now I can't send email to my own address, but works for all other domains, like AOL, yahoo, MSN, hotmail, etc.

But when I try to send email to test@mydomain.com I get this error:
sendmail error 67 (User unknown.)

Could you advice?

Thanks
0
The--CaptainCommented:
Sure - would you like to post this in a new question (as it would then show up with a proper title at the top of the question list)?  Since you found the answer to your original question (can you share your solution, BTW?) on your own, as a ZA/PE I can offer to delete or PAQ this question and refund your pts so you can use them towards a new question.

I fear if you do not then I may be the only one responding to your new question, and although I am by no means unfamiliar with sendmail, I think you could probably benefit even more from the additional advice of other experts.

Please advise.

Cheers,
-Jon


0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Email Servers

From novice to tech pro — start learning today.