1

I have a postfix/dovecot system setup on Ubuntu 10.04, and it sends/receives emails fine, but when I send emails they are all from [email protected].

For example, I have a user called "info" and when I try to send an email using mutt from this Mailbox "/home/vmail/mydomain.com/info/Maildir" the email will send find but it will be from "[email protected]" and not "[email protected]". I have 3 mailboxes (/home/vmail/mydomain.com/root/Maildir, /home/vmail/mydomain.com/root/postmaster, and /home/vmail/mydomain.com/root/info) and they all send and receive emails.

I am new to postfix and dovecot... can someone who knows what they are doing help me out on this one??

 30 myhostname = mail.mydomain.com
 31 alias_maps = hash:/etc/aliases
 32 alias_database = hash:/etc/aliases
 33 myorigin = mydomain.com #have tried setting myorigin = mail.mydomain.com and still same problem
 34 mydestination = mail.mydomain.com, localhost, localhost.localdomain
 35 relayhost =
 36 mynetworks = 127.0.0.0/8
 37 mailbox_size_limit = 0
 38 recipient_delimiter = +
 39 inet_interfaces = all
 40 html_directory = /usr/share/doc/postfix/html
 41 message_size_limit = 30720000
 42 virtual_alias_domains =

This is from the aliases file

 postmaster: root
 root: [email protected]
2
  • What user are you logged in as when you are using Mutt?
    – Ladadadada
    Mar 25, 2012 at 20:51
  • I am logged in as root. I guess this is not an error, and just how mutt is programmed? I thought if I was in a users mailbox the from header would be for that user. Mar 25, 2012 at 21:51

1 Answer 1

0

You need the following two settings in your .muttrc:

realname="info"
from="[email protected]"

You can also edit the headers of a message before sending by using E (that is the default on my machine, check with ?). This will open the whole message in your editor and you can fiddle with the headers to your heart's content.

UPDATE:

Sorry I should just say, if you want these settings to only be asserted when accessing certain mailboxes, you need some accounts/folder hooks. You'll need to adapt these to your situation (as these are munged from my own .muttrc for my imap access):

account-hook imaps://<dovecot domain>/ 'set imap_user="info"'
folder-hook imaps://<dovecot domain>/ 'set folder="imaps://<dovecot domain>" record="+Sent"  postponed="+Drafts" from="[email protected]" realname="info"'

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .