

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
11 messages in net.sourceforge.lists.courier-maildropRe: [maildropl] How do I set an MOTD| From | Sent On | Attachments |
|---|---|---|
| Malaney J. Hill | Oct 29, 2006 8:28 am | |
| Sam Varshavchik | Oct 29, 2006 8:58 am | |
| Malaney J. Hill | Oct 29, 2006 9:25 am | |
| Sam Varshavchik | Oct 29, 2006 10:16 am | |
| Jay Lee | Oct 30, 2006 5:44 am | |
| Tony Earnshaw | Oct 30, 2006 8:08 am | |
| Jay Lee | Oct 30, 2006 8:21 am | |
| Tony Earnshaw | Oct 30, 2006 8:37 am | |
| Malaney J. Hill | Oct 30, 2006 9:04 am | |
| Tony Earnshaw | Oct 30, 2006 11:40 am | |
| Mike Leone | Nov 8, 2006 11:22 am |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | Re: [maildropl] How do I set an MOTD | Actions... |
|---|---|---|
| From: | Tony Earnshaw (teri...@barlaeus.nl) | |
| Date: | Oct 30, 2006 11:40:43 am | |
| List: | net.sourceforge.lists.courier-maildrop | |
Malaney J. Hill wrote:
Ok, so I appreciate all of the chatter. I did read up on Maildir and now understand why messages first must be copied to tmp/ before being moved to new/. I even flushed an hour down the toilet last night realizing just how important the permissions of these newly moved messages are in the grand scheme of things.
Utter waste of time.
This all still leaves me with a burning desire to get an MOTD working for my IMAP users. Certainly I can send an email to each and everyone of them, but that's so disco, especially when we have all of these great tools at our disposal. Besides, I AM THE CEO of my company ... and the janitor too.
Don't boast. Like people quoting long strings of Phd. and MCSE/RHCE etc. after their names and then asking for elementary help. I'm a pretty poor but certified photographer portrait and commercial City and Guilds of London Institute anno 1960 and a bloody good self-taught concrete technologist anno a couple of years later, but I don't boast about them. Or many other certs I've gained.
What I would like to do is create a single file, say /etc/imap_motd and then have that file appear as a new message in all of my user's INBOXes.
Well, that's what we (I) do.
If I hear correctly, you are saying write a cron job that checks the timestamp on the motd file and if changed copies the file to each users /tmp dir, chowns it appropriately, then MOVES that file in the /tmp dir to the /new dir and chowns it again.
No.
Does this sound right?
Absolutely not.
Finally, how could this be accomplished with a hard link?
hard link == red herring. Forget all the crap people have told you in this thread (apart from mine, mine works, I use it in practice).
If I make a hard link to a file then what happens when the user deletes the message? What happens when I want to change the MOTD?
You change the MOTD and rerun the program. In the enclosed script the MOTD is within the script (so-called "here document"), but it could just as well be a cat of a file or whatever.
The script assumes you know basic shell scripting and that you can cope with a user base in LDAP. If you don't know (or care to know) LDAP, you'll have to adapt it to your own user DB base (/etc/paswd, pam, SQL, anything).
--Tonni
-- tonni at barlaeus.nl Tony Earnshaw
for group in beheerders directie docenten leerlingen personeel;do
for uid in $(ldapsearch2.3 -x -LLL -b "ou=$group,dc=barlaeus,dc=nl" uid | awk
-F ': ' '/uid:/ { print $2 }');do
mail -s "Update van ons webmailprogramma" $uid<<EOF
Woensdag 29 Maart
Beste e-mail gebruiker,
We hebben een update van ons webmail (SquirrelMail) programma draaien *naast* het bestaande. De bedoeling is, dat het bij tijd en wijlen het bestaande gaat vervangen.
## Rest of the motd shoot
-- Tony Earnshaw Systeembeheer, Barlaeus Gymnasium, Amsterdam EOF done done







