By arieltoledo
So, I,ve setup up postfix in my server following this article https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-postfix-as-a-send-only-smtp-server-on-ubuntu-16-04. Whe i make the indicated test of the article mails are reviced as root@innovaclub.localdomain instead of the desire @innovaclub.org. I uncommented the myorigin = /etc/mailname line and edited the mailname file adding innovaclub.org in the firstline but still not working. Any help will be much appreciatte.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
@hansen thanks ! that did the trick hostname was set to “innovaclub” instead to innovaclub.org. Now its working.
First step done. Now I have to config php to send mails trought smtp postfix to avoid going directly to gmail spam folder.
Hi @arieltoledo
Try running this command to validate the specific myorigin:
postconf | grep myorigin
You can show all the Postfix configuration by running just postconf. Remember to restart Postfix after changing the configuration - otherwise it isn’t active.
But it might be Apache/PHP that is actually doing this, which can be fixed by setting the sendmail_path correctly by adding the following line to the Apache vhost config:
php_value sendmail_path "/usr/sbin/sendmail -t -f hello@innovaclub.org -i "
Or it can again be overruled by Postfix smtp_generic_maps:
https://stackoverflow.com/questions/14370224/change-outgoing-mail-address-from-rootservername-rackspace-sendgrid-postfix
@hansen thanks for reply.
I follow this steps.
1.-
postconf | grep myorigin
append_at_myorigin = yes
myorigin = /etc/mailname
2.-
cat mailname
innovaclub.org
Seems Postfix config looks ok.
3.- Added this to my 000-default as my server its going to manage only 1 website.
<Directory /var/www/html/>
php_value sendmail_path "/usr/sbin/sendmail -t -f info@innovaclub.org -i "
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
smtp_generic_maps = hash:/etc/postfix/generic but after that postfix wont send emails.So far none of this work. still getting root@innovaclub.localdomain
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.