Ubuntu 10.10 Desktop: configuring postfix to send mail as

12
2013-08
  • wbg

    I have been learning how to use postfix to end email using the command line, which I find helpful when at work and I don't want to open a browser or switch to mouse, to send an email about my broken stuff to system admin. I've been practicing from my laptop.

    Ubuntu uses postfix, and I found the file /etc/postfix/main.cf

    The default is for sent mail to be $USER@$mydomain, so at this point I have: $[email protected] as the sender when I check my gmail account.

    I can't figure out how to get another name other than $USER, such as my regular gmail name, so people can respond to my gmail account.

    TIA !

    wbg

  • Answers
    Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

    Related Question

    Just want to send emails from my Ubuntu Server. What simple SMTP server solution to use?
  • TraderJoeChicago

    Basically I have a Ubuntu Server machine and I would like an idiot-proof solution for sending emails from my website that is also running in this same machine.

    My doubts are:

    1) Should I use postfix or there are more simple solutions for an smtp server?

    2) Do I need to be able to receive emails as well? I just want to send emails...

    3) I did I simple test with postfix that came with my Ubuntu server and the email got sent, but it went to the spam box of my gmail. Anyway to avoid the spam box?

    4) The email sender was [email protected] How do I change that?

    Thanks very much!

    -Sergio


  • Related Answers
  • rakete

    Desktop Ubuntus choice is the package msmtp-mta (installed as default sendmail replacement).

  • Marian

    First: You will want to add the possibility to receive mails, and if it's only for Bounces, unless you use an email other than one on the server. If you do, you probably won't need the SMTP server either – every email provider I know provides one by itself.

    Postfix is not very difficult to configure, as long as you know what you are doing. You might want to read the Postfix documentation and about mail systems in general.

    Yes, this is work, but you chose to run your own server. If you don't want the work, don't run one.

    The email sender was [email protected] How do I change that?

    This should be the canonical address rewriting.

    About the spam thing: Is your server located at your home? Mails from dialup connections are usually blocked everywhere.

  • malatio

    This is not exactly the solution you said you were looking for, but if you have access to some other smtp server, you can use nullmailer.

    It is 93kB installed for karmic, and needs one or two lines of configuration.. :)

    Description: simple relay-only mail transport agent Nullmailer is a replacement MTA for hosts, which relay to a fixed set of smart relays. It is designed to be simple to configure and especially useful on slave machines and in chroots.

  • jonsca

    An SMTP server is used to send mail and a POP3 to receive mail. For the spam delivery, I am not sure of what could cause that, because I sent a mail from an application using gmail SMTP detail, but the mail was delivered into my spam mails.

  • KeithB

    1) You only need a smtp server if you want to receive email. It is not needed to only send it.

    3) the spam box is a function of the receivers email system, not the senders. There is no way to guarantee not to be put in the spam box. You can minimize it by making your messages not look like spam (which is a topic for another question).

    4) That is probably the default sender. Whatever api you are using to send mail should allow you to configure that. It should probably be set to an address that can receive mail.

  • Shadowfirebird

    It's possible that your mail was marked as spam because the sender was an obvious default - "mysite.dyndns.org".

    To fix that: I'm far from a Postfix expert, but have you looked in /etc/postfix/, probably the file main.cf?

  • CarlF

    You don't need to run an SMTP server yourself. You can rig your system to send using a different box's server. For instance, if you have access to your ISP's (or hosting service's) mail server, you can send mail from there.

    To give a really useful answer would require actually knowing what you're trying to do--your explanation is really vague. Do you want to send email from a CGI script, or what?

  • Charles Stewart

    Postfix is dead easy if you aren't going to be relaying mail. Your problem is not Postfix's fault: it sounds as if Postfix is working fine.

    Spam: look at SPF — SPF can tell other sites that you have a policy of only sending mail that comes from the same machine. But you'll need to hack DNS to set that up. Use a nameserver checker to see if there aren't any obvious problems, like reverse DNS not being set up on your site: see the SF qn, Nameserver Checker.

  • Stacey Richards

    Relay the email from your SMTP server to your ISP's SMTP server.

    Add the following option to /etc/postfix/main.cf:

    relayhost = smtp.yourisp.com