LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-15-2018, 03:07 AM   #1
Linux.Girl
Member
 
Registered: Aug 2010
Posts: 53

Rep: Reputation: 2
use altermime + script to add a disclaimer to outgoing mails


Hello everyone,

I followed this tutorial to use altermime + script to add a disclaimer to outgoing mails:

https://www.howtoforge.com/add-autom...ostfix-fedora8

When I send a mail, no disclaimer is added.

When I run the script with bash -x to debug, I see it stops on the cat line - it creates the folder but cannot write to it so it aborts.

I did all the installations as root and both root and user filter have full permissions to all folders.

Does anyone know what could be wrong?

Perhaps I should run the script as user filter instead of root?

I tried changing almost all the parameters but nothing works. I downloaded the RPM from a centos repository but it is being used in a RedHat server.

Many thanks in advance!
 
Old 02-15-2018, 05:40 AM   #2
bitfuzzy
Member
 
Registered: Nov 2003
Location: NY
Distribution: slackware
Posts: 464

Rep: Reputation: 133Reputation: 133
It's not what you're looking for, but I've personally found adding footers through the email 'client' to be a more easily implemented solution

Ken
 
Old 02-15-2018, 05:44 AM   #3
Linux.Girl
Member
 
Registered: Aug 2010
Posts: 53

Original Poster
Rep: Reputation: 2
Hi, can you elaborate? Not sure I understood your suggestion. Thanks!
 
Old 02-15-2018, 06:46 AM   #4
bitfuzzy
Member
 
Registered: Nov 2003
Location: NY
Distribution: slackware
Posts: 464

Rep: Reputation: 133Reputation: 133
The email client (Thunderbird, KMail, Outlook, OE, etc) you (or your users) use to send emails can be configured to attach "footers" to messages.
 
Old 02-15-2018, 09:01 AM   #5
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,763

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Quote:
Originally Posted by Linux.Girl View Post
Hello everyone,

I followed this tutorial to use altermime + script to add a disclaimer to outgoing mails:

https://www.howtoforge.com/add-autom...ostfix-fedora8

When I send a mail, no disclaimer is added.

When I run the script with bash -x to debug, I see it stops on the cat line - it creates the folder but cannot write to it so it aborts.

I did all the installations as root and both root and user filter have full permissions to all folders.

Does anyone know what could be wrong?

Perhaps I should run the script as user filter instead of root?

I tried changing almost all the parameters but nothing works. I downloaded the RPM from a centos repository but it is being used in a RedHat server.

Many thanks in advance!
You did this?
Code:
chown filter:filter /var/spool/filter
chmod 750 /var/spool/filter
Looks like the script should be owned by filter, not root.

I see nothing in that script that creates a "folder" -- it only wants to create a file in INSPECT_DIR (/var/spool/filter)
 
Old 02-15-2018, 09:25 AM   #6
Linux.Girl
Member
 
Registered: Aug 2010
Posts: 53

Original Poster
Rep: Reputation: 2
Thank you Sean, I did run the chown command but I will double check.

Regarding the folders, I know it doesn't say so in the script, but in actuality it creates a folder .tmp under /var/spool/filter - I see that when I run the script with bash -x - I see that it stops at the cat line. Then I see a folder number.tmp was created and looks like it is trying to write something.

Let's say the owner is indeed filter - but I am logged in as root - would the script function ok or do I need to log in as filter?

Did you try the script yourself? Did it work for you?

Many thanks!
 
Old 02-15-2018, 11:00 AM   #7
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,763

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Quote:
Originally Posted by Linux.Girl View Post
Thank you Sean, I did run the chown command but I will double check.

Regarding the folders, I know it doesn't say so in the script, but in actuality it creates a folder .tmp under /var/spool/filter - I see that when I run the script with bash -x - I see that it stops at the cat line. Then I see a folder number.tmp was created and looks like it is trying to write something.

Let's say the owner is indeed filter - but I am logged in as root - would the script function ok or do I need to log in as filter?

Did you try the script yourself? Did it work for you?

Many thanks!
No, I haven't tried the script...I do what bitfuzzy suggested and use the email client to add footers. I don't see the need to complicate my email server setup.

I'd think you'd need to log in as the email user to send an email...no?
 
Old 02-15-2018, 12:51 PM   #8
Linux.Girl
Member
 
Registered: Aug 2010
Posts: 53

Original Poster
Rep: Reputation: 2
This is what I see when I run with bash -x and this in.5250 is the file that is created when it gets stuck on the cat command, only each time you run it you get a different number for the in. file. Ideas?Click image for larger version

Name:	Capture2.PNG
Views:	144
Size:	114.8 KB
ID:	27005
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Add disclaimer to outgoing messages in Postfix and Sendmail LXer Syndicated Linux News 0 05-13-2013 11:40 PM
LXer: How To Automatically Add A Disclaimer To Outgoing Emails With alterMIME (Postfix On Debian Squ LXer Syndicated Linux News 1 01-16-2013 09:47 PM
qmail - how to add disclaimer on every outgoing emails Winanjaya General 3 11-24-2010 02:00 PM
LXer: How To Automatically Add A Disclaimer To Outgoing Emails With alterMIME (Postfi LXer Syndicated Linux News 0 01-08-2008 06:11 PM
add header information to outgoing e-mails - postfix paul_mat Linux - Networking 1 05-16-2006 05:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration