>>>>> "Michael" == Michael Monnerie <[EMAIL PROTECTED]> writes:

>> So, clearly the expansion did *not* occur in postfix, but rather in
>> the mailclient.

Michael> Shitty Outlook... thanks for the analyzation. So there's nothing
Michael> I can  do about it?

You would need to add a bogus email address to such From: lines before
storing them in the db.  Perhaps something like <[EMAIL PROTECTED]>.

Postfix may be able to do that out of the box.  Otherwise you'll need to
hack it in to either postfix or dbmail.

Alternatively you could hack dbmail-imapd and/or dbmail-popd to do it.

A SELECT on dbmail_fromfield can tell you how many mails exist in your
db which lack an address in the From: header.  I don't know exactly how
dbmail will store such a row given that the schema says the fromaddr is
NOT NULL, but this may work:

   SELECT physmessage_id FROM dbmail_fromfield WHERE fromaddr !~ '@';

(Modify as required if you use mysql or sqlite.)

(Note that pgsql (at least) will do a sequential scan because that query
uses the ~ operator, so it may take a while if you have a large db.  It
took my dinky laptop 23 seconds to scan 340000 rows.)

Incidently, my test of that query (with a select *) shows several
messages with no fromname, only a fromaddr.  One example has this From:
header in the messageblk:

,----
| From: StephenKing.com Newsletter <[EMAIL PROTECTED]>
`----

The fromfield table has:

,----{ SELECT fromname,fromaddr from dbmail_fromfield where 
fromaddr='StephenKing.com'; }
| <table border="1">
|   <tr>
|     <th align="center">fromname</th>
|     <th align="center">fromaddr</th>
|   </tr>
|   <tr valign="top">
|     <td align="left">&nbsp; </td>
|     <td align="left">StephenKing.com</td>
|   </tr>
| </table>
| <p>(1 row)<br />
| </p>
`----

(I used html output so that the contents of the fromname column would be
visible and definitive.)

So dbmail's code for breaking the From: header up for the
dbmail_fromfield table needs some love....

-JimC
-- 
James Cloos <[EMAIL PROTECTED]>         OpenPGP: 1024D/ED7DAEA6
_______________________________________________
DBmail mailing list
[email protected]
https://mailman.fastxs.nl/mailman/listinfo/dbmail

Reply via email to