Menu

#26 Remove commas from sender's name in e-mail

open
nobody
None
5
2004-08-12
2004-08-12
No

On my system there are multiple sections to the name
field in /etc/passwd, separated by commas:

elliot:x:1018:1018:Elliot
Schwartz,,,:/home/elliot:/bin/bash

When the e-mail is sent, it includes the commas:

From: Elliot Schwartz,,, <elliot@mit.edu>

I fixed this by changing:

name = pwinfo[4]

to:

name = pwinfo[4].split(",")[0]

But maybe there's a better way to do this using the pwd
library.

Discussion

  • Enver Haase

    Enver Haase - 2005-02-15

    Logged In: YES
    user_id=157422

    Same effect here, cvs-syncmail brags out the fields
    with phone number etc. otherwise. Patch works for me,
    would recommend adding it.

    Enver

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.