<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-291117001383316504</id><updated>2024-09-23T15:59:16.956+05:30</updated><category term="All"/><category term="Linux"/><category term="Linux Server Topic"/><category term="Linux Basic"/><category term="command"/><category term="automation"/><category term="ansible"/><category term="Ubuntu"/><category term="interview question"/><category term="Bash Scripts"/><category term="shell"/><category term="windows"/><category term="Openstack"/><category term="network"/><category term="Linux Error"/><category term="Security"/><category term="vi editor"/><category term="Cloud"/><category term="Monitoring"/><category term="Open-Stack"/><category term="virtualisation"/><category term="mail configuration"/><category term="AWS"/><category term="Firewall"/><category term="Trick"/><category term="gallery"/><category term="elasticsearch"/><category term="regular expression"/><category term="Bacula"/><category term="WSL2"/><category term="Youtube"/><category term="logstash"/><category term="nagios"/><category term="systemd"/><category term="AI"/><category term="Docker"/><category term="Kali Linux"/><category term="OpenStack Configuration"/><category term="OpenStack Tutorial"/><category term="SSL Certificates"/><category term="domain registration"/><category term="filebeat"/><category term="git"/><category term="powershell"/><category term="AdSense"/><category term="IPMI"/><category term="PXE boot"/><category term="Terraform"/><category term="crontab"/><category term="kubernetes"/><category term="kvm"/><category term="owncloud"/><category term="Cloudflare"/><category term="Database"/><category term="ESP8266"/><category term="Funny Linux Command"/><category term="Gmail"/><category term="Indian Festival"/><category term="Jenkins"/><category term="Pi Network"/><category term="Radius"/><category term="Raid"/><category term="Review"/><category term="Samba"/><category term="bonding"/><category term="clonezilla"/><category term="filesystem"/><category term="kibana"/><category term="mbr to gpt"/><category term="ngrok"/><category term="ubunut"/><category term="udev"/><title type='text'>LinuxTopic</title><subtitle type='html'>Linux Tutorials, Ubuntu, Tutorial,  Linux Administration, Linux Admin,  System Admin, System Administrator, CentOS, Linux, Kali Linux, Linux basic command, Linux Mint, server configuration, automation tools, DevOps Tools, apache, cloud, OpenStack, Ansible Tutorials, Kibana, ELK, AWS, Docker, Kubernetes, Terraform and so forth. for beginners and professionals, we tried to create all posts with a screenshot. </subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.linuxtopic.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/291117001383316504/posts/default?max-results=1&amp;redirect=false'/><link rel='alternate' type='text/html' href='http://www.linuxtopic.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/291117001383316504/posts/default?start-index=2&amp;max-results=1&amp;redirect=false'/><author><name>Linuxtopic</name><uri>http://www.blogger.com/profile/12411230835520798076</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>225</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>1</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-291117001383316504.post-2108267279402010926</id><published>2024-05-28T18:58:00.003+05:30</published><updated>2024-05-28T19:05:26.103+05:30</updated><category scheme="http://www.blogger.com/atom/ns#" term="All"/><category scheme="http://www.blogger.com/atom/ns#" term="Bash Scripts"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux"/><category scheme="http://www.blogger.com/atom/ns#" term="Linux Basic"/><category scheme="http://www.blogger.com/atom/ns#" term="mail configuration"/><title type='text'>Send no-reply email from postfix using canonical file #linuxtopic</title><content type='html'>&lt;div&gt;This post is below to &lt;b&gt;&quot;Postfix configuration&quot;&lt;/b&gt; and here we &quot;rewrite the from address&quot; of all outgoing emails&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;ul style=&quot;text-align: left;&quot;&gt;&lt;li&gt;How to send no-reply@ email from postfix&amp;nbsp;&lt;/li&gt;&lt;li&gt;Send email with no-reply&amp;nbsp;&lt;/li&gt;&lt;li&gt;How to send email from postfix with noreply / no-reply&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgNoKkTbItmPkOFMqbZy09CNmfYlvkqEXVxTTMvU608TlY6Tkvoj4_jCl6hhj9IA1HDqlK0D1GZsary7B7lt6mCthe0R77C7Lr98i6TWTtWazpGihlFuG6ZVU7qaaAzpHwFxsFiZLDpokfC0VZO5jrTdVe7SgG1e6QMbLNWK8hDCTwTtLfikU1y3He7G6I&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img alt=&quot;Postfix configuration, rewrite from address to no-reply using canonical maps file&quot; data-original-height=&quot;242&quot; data-original-width=&quot;333&quot; src=&quot;https://blogger.googleusercontent.com/img/a/AVvXsEgNoKkTbItmPkOFMqbZy09CNmfYlvkqEXVxTTMvU608TlY6Tkvoj4_jCl6hhj9IA1HDqlK0D1GZsary7B7lt6mCthe0R77C7Lr98i6TWTtWazpGihlFuG6ZVU7qaaAzpHwFxsFiZLDpokfC0VZO5jrTdVe7SgG1e6QMbLNWK8hDCTwTtLfikU1y3He7G6I=s16000&quot; title=&quot;Postfix configuration, rewrite from address to no-reply using canonical maps file, postfix&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;change from address to no-reply in postfix&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Postfix is sending an email with using the current logged in username @domain name, In this post we will &lt;b&gt;&quot;configure the postfix&quot;&lt;/b&gt; for sending an email using no-reply@linuxtopic.com&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Step 1st:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;If file not exist then Create a canonical file that have a line to rewrite or replace all outgoing email&amp;nbsp; to no-reply@domain&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Open or Create a file, add below syntax and save&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #073763;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;blockquote&gt;&lt;b&gt;&lt;span style=&quot;color: #073763;&quot;&gt;vi /etc/postfix/canonical&lt;/span&gt;&lt;/b&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;div&gt;If we want to rewrite particular email with no-reply, use the following this format&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span&gt;lokesh@linuxtopic.com&lt;span&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;no-reply@linuxtopic.com&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;#To rewrite all the email, use the following this format in canonical map file&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;/.*/&amp;nbsp; &amp;nbsp; no-reply@linuxtopic.com&lt;/b&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Step 2 -&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Edit/re-reconfigure a postfix configuration file, I would suggest to create a backup of existing postfix configuration file before making a change.&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;Backup:&lt;/b&gt;&lt;/div&gt;&lt;div&gt;cp /etc/postfix/main,cf&amp;nbsp; &amp;nbsp;/etc/postfix/main.cf-`date -I`&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;A - Open Postfix Configuration file and append/add below configuration if&amp;nbsp;you want rewrite particular email with no-reply (&amp;nbsp;&lt;b&gt;lokesh@linuxtopic.com&amp;nbsp; &amp;nbsp;&amp;nbsp;no-reply@linuxtopic.com )&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;blockquote&gt;&lt;b&gt;&lt;span style=&quot;color: #073763;&quot;&gt;vi&amp;nbsp; /etc/postfix/canonical&lt;/span&gt;&lt;/b&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;a href=&quot;http://www.postfix.org/postconf.5.html#sender_canonical_maps&quot;&gt;sender_canonical_maps&lt;/a&gt; = hash:/etc/postfix/canonical&lt;br /&gt;&lt;div&gt;OR&lt;br /&gt;&lt;a href=&quot;http://www.postfix.org/postconf.5.html#canonical_maps&quot;&gt;canonical_maps&lt;/a&gt; = &lt;a href=&quot;http://www.postfix.org/DATABASE_README.html#types&quot;&gt;hash&lt;/a&gt;:/etc/postfix/canonical&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;B - Open Postfix Configuration file and append/add below configuration if&amp;nbsp;you want rewrite all the email with no-reply (&amp;nbsp;&lt;b&gt;/.*/&lt;/b&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; no-reply@linuxtopic.com )&amp;nbsp;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;&lt;blockquote&gt;&lt;b&gt;&lt;span style=&quot;color: #073763;&quot;&gt;vi&amp;nbsp; /etc/postfix/canonical&lt;/span&gt;&lt;/b&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;a href=&quot;http://www.postfix.org/postconf.5.html#sender_canonical_maps&quot;&gt;sender_canonical_maps&lt;/a&gt;&amp;nbsp;= regexp:/etc/postfix/canonical&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Step 3 - Update Postfix maps by executing the following command to create and update the canonical database&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;blockquote&gt;&lt;span style=&quot;color: #073763;&quot;&gt;sudo postmap /etc/postfix/canonical&lt;/span&gt;&lt;/blockquote&gt;&lt;/b&gt;&lt;/div&gt;&lt;div&gt;Step 4 - Reload Postfix service&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;span style=&quot;color: #073763;&quot;&gt;&lt;/span&gt;&lt;/b&gt;&lt;blockquote&gt;&lt;b&gt;&lt;span style=&quot;color: #073763;&quot;&gt;systemctl reload postfix&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Step 5 - Text &amp;amp; Enjoy&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;blockquote&gt;&lt;span style=&quot;color: #073763;&quot;&gt;&lt;b&gt;echo &quot;Test no-reply&quot; | mail -s &quot;rewrite from address with no-reply&quot; lokesh@linuxtopic.com&lt;/b&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;Thanks you !!&lt;div&gt;&amp;nbsp;I  hope this topic  gave you all the information you needed.  If you have any further questions or would like more detailed directions feel free to contact us using any of the following sources.We look forward to talking to you.&lt;/div&gt;&lt;/div&gt;&lt;div class=&quot;blogger-post-footer&quot;&gt;https://draft.blogger.com/feeds/291117001383316504/posts/default&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://www.linuxtopic.com/feeds/2108267279402010926/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.linuxtopic.com/2024/05/blog-post.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/291117001383316504/posts/default/2108267279402010926'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/291117001383316504/posts/default/2108267279402010926'/><link rel='alternate' type='text/html' href='http://www.linuxtopic.com/2024/05/blog-post.html' title='Send no-reply email from postfix using canonical file #linuxtopic'/><author><name>Lokesh Carpenter</name><uri>http://www.blogger.com/profile/17797261793417041421</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaKkCIsauKRTZZRgTzGaV3kwCWJb5LwbF7cu4nGswZoQyS13wfgm9P3lOhNIovaZ2A6cebm4nNXFCrN_wPrk58VVwaSLeiv8_4f9tJPxwcWWJp9jv3vKiJFXADUyslUwz1CG8KTjSN9YhGpWsZb3wlWIFM9gYUtG8yh0GeRNw4CN1q9wo/s220/IMG_7423.JPG'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/a/AVvXsEgNoKkTbItmPkOFMqbZy09CNmfYlvkqEXVxTTMvU608TlY6Tkvoj4_jCl6hhj9IA1HDqlK0D1GZsary7B7lt6mCthe0R77C7Lr98i6TWTtWazpGihlFuG6ZVU7qaaAzpHwFxsFiZLDpokfC0VZO5jrTdVe7SgG1e6QMbLNWK8hDCTwTtLfikU1y3He7G6I=s72-c" height="72" width="72"/><thr:total>0</thr:total></entry></feed>