postfix, change nome of sender..

Gentlemen,
I am having difficulty performing the following configuration:

in my yahoo inbox persists root as the sender.
Well I would like to appear rogerio_root@rogerdom.int or rogerio_root

I do not have much experience w / postfix, where I am going wrong or what is missing ??

Below the details of my setup:

Opensuse 13.2, postfix 2.11.3, localdomain.

/etc/postfix/main.cf:
myhostname = suse-mini2.rogerdom.int
data_directory = /var/lib/postfix
daemon_directory = /usr/lib/postfix
inet_interfaces = all
smtp_generic_maps = hash:/etc/postfix/generic
sender_canonical_maps = hash:/etc/postfix/canonical
alias_maps = hash:/etc/postfix/aliases
alias_database = hash:/etc/postfix/aliases

relayhost = [smtp.gmail.com]:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_tls_CAfile = /etc/ssl/certs/ca.crt
smtp_use_tls = yes
setgid_group = maildrop

/etc/postfix/aliases:
root: rogerio_root

and newaliases to rebuild aliases.db

/etc/postfix/canonical:
root rogerio_root@rogerdom.int
root@localhost rogerio_root@rogerdom.int
root@rogerdom rogerio_root@rogerdom.int
root@suse-mini2.rogerdom.int rogerio_root@rogerdom.int

postmap /etc/postfix/canonical

I restarted my postfix

mail -s “teste from postfix” rogerio_57@yahoo.com

journalctl -u postfix.service

Jul 25 10:06:28 suse-zero postfix/pickup[2063]: E0AF465F5D: uid=0 from=<root>
Jul 25 10:06:28 suse-zero postfix/cleanup[2096]: E0AF465F5D: message-id=<20150725130628.E0AF465F5D@suse-mini2.rogerdom.int>
Jul 25 10:06:28 suse-zero postfix/qmgr[2064]: E0AF465F5D: from=<rogerio_root@rogerdom.int>, size=472, nrcpt=1 (queue active)
Jul 25 10:06:36 suse-zero postfix/smtp[2098]: E0AF465F5D: to=<rogerio_57@yahoo.com>, relay=smtp.gmail.com[173.194.219.108]:587, delay=
Jul 25 10:06:36 suse-zero postfix/qmgr[2064]: E0AF465F5D: removed

thank you very much!!!

On 2015-07-25 15:36, rogeriopaju wrote:
>
> Gentlemen,
> I am having difficulty performing the following configuration:
>
> in my yahoo inbox persists root as the sender.
> Well I would like to appear rogerio_root@rogerdom.int or rogerio_root
>
> I do not have much experience w / postfix, where I am going wrong or
> what is missing ??

You do not do this in postfix. You do this in the MUA, the mail program
you use to create the mail:


mail -r rogerio_root@rogerdom.int \
-s "teste from  postfix" rogerio_57@yahoo.com

Although it can be changed in postfix, too.


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

Thanks Carlos, but with this option, in my inbox displays my email configured in / etc / postfix / sasl_passwd (my email of gmail)

As for the possibility of holding it in postfix, I would know…

Thanks!!!

On 2015-07-25 22:36, rogeriopaju wrote:
>
> Thanks Carlos, but with this option, in my inbox displays my email
> configured in / etc / postfix / sasl_passwd (my email of gmail)

I’m sorry, but I don’t understand this paragraph. Could you rephrase,
please?


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

Hi Carlos, I meant it when running the command:

mail -r rogerio_root@rogerdom.int
-s “teste from postfix” rogerio_57@yahoo.comwhen check my yahoo email, the sender does not bring “rogerio_root@rogerdom.int”, but, roger.corpore@gmail.com - my account configured in / etc / postfix / sasl_passwd (postfix with gmail SMTP).

On 2015-07-26 03:16, rogeriopaju wrote:
>
> Hi Carlos, I meant it when running the command:
>
> mail -r rogerio_root@
> -s “teste from postfix” rogerio_57@yahoo.com when check my yahoo email,
> the sender does not bring “rogerio_root@rogerdom.int”, but,
> roger.corpore@gmail.com - my account configured in / etc / postfix /
> sasl_passwd (postfix with gmail SMTP).

Ah… ok.

Well… “sasl_passwd” can not change the from address. However, the
domain “rogerdom.int” does not exist, so it is possible that gmail
replaces it with the one used to do the authentication.

However, it is strange that google allows you to post with a domain that
does not exist at all, because it verifies this first, so you must have
this change configured somewhere else.

If you track mail processing in syslog or systemd journal, you should
see what is happening.


Cheers / Saludos,

Carlos E. R.

(from 13.1 x86_64 “Bottle” (Minas Tirith))

ok, Carlos !! :good::good:
I was suspicious that the fact of not having registered domain could influence it, I will make a test c / a registered domain.

Taking advantage of some of this topic, I had said that any adjustments could be made in postfix, instead of treating this exchange with the command (-r mail …).

how this could be done in postfix?

thanks again !!!

On 2015-07-26 14:16, rogeriopaju wrote:

> Taking advantage of some of this topic, I had said that any adjustments
> could be made in postfix, instead of treating this exchange with the
> command (-r mail …).
>
> how this could be done in postfix?

virtual - maps external to internal

sender_canonical - changes the “from” on internal mail to an external
one. This is the one for you:

cer@Telcontar.valinor somename@gmail.com


Cheers / Saludos,

Carlos E. R.
(from 13.1 x86_64 “Bottle” at Telcontar)