Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I have Postfix suite installed locally on Ubuntu 10.10. I can send/receive mail to my local address, e.g. user@local.com. I'm given credentials to a remote mail server mailbox, e.g. other@remote.com.

What command line incantation on my local box would connect me to SMTP server at remote.com providing username and password and send mail through it?

I've read sendmail and smtp manpages but that didn't give me any clue.

share|improve this question
add comment

2 Answers

You will need to have Postfix relay the messages to the remote server. This will require a change to the Postfix configuration. You'll need to enable Postfix's SASL authentication to handle the authentication. Once configured, you can use your local SMTP server as you did with local addresses, and the local server will relay them on the the remote server.

share|improve this answer
add comment
up vote 0 down vote accepted

Actually, Postfix turned out to be irrelevant to my problem. Using it would be an overkill for this task: it requires per-host configuration, where per-user would do.

I figured out msmtp is well enough for my task.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.