Community Discussions and Support
Configure Pegasus to add hostname to message headers?

As I understand it, v1.4 is the first release to look at the identity name, and not require an identity's e-mail address. Everyone at my location is set to use the Default identity only and I have lots of things disabled (using the disable extension) or removed from the PMAIL run directory.

 
I am not sure if there is some setting or way to "trick" the v1.4 into applying the info to all outbound messages but you can try asking Gerard Thomas (he responds rather quickly to e-mail but hasn't been overly helpful when I've asked how to use his extension in a non-standard way). You might try a DOS-type wildcard or Pegasus-aware variable / substitution. The following are from the UDG.TXT file and may only work at runtime (not when an identity is changed) but they might be of some use:

 
 Command substitution
--------------------

Most of the entries in this screen which accept strings allow
you to use special command substitution characters in the strings:
these are like "escape sequences" which will cause PMail to perform
some substitution at run-time. Command substitutions always begin
with a tilde (~) character, and are always two characters long.
The following command substitutions are recognised:

   This sequence...   Is replaced with this value

   ~c       The full path to the file containing the message
   ~t       The address to which to send this message
            (note: this is not necessarily the To: field)
   ~s       The message's subject field
   ~f       The full form of the message's "from" field
   ~n       The sender's user name in its simplest form
   ~b       The sender's bindery id, as a long hex integer
   ~8       The first 8 chars in the sender's username
   ~y       The time and date in RFC-822 format
   ~d       A random integer, expressed as 4 hex digits
   ~q       Y if this message is a BCC, N otherwise
   ~%name%  The value of the environment variable %name%.
   ~p       The user's personal name preference
   ~x       The name.ext ONLY of the container file (no path)
   ~a       The directory from which PMail was run (or base directory)
   ~h       The current user's home mailbox location
   ~w       The current user's new mail location
   ~~       A single tilde character

 

<p>As I understand it, v1.4 is the first release to look at the identity name, and not require an identity's e-mail address. Everyone at my location is set to use the Default identity only and I have lots of things disabled (using the disable extension) or removed from the PMAIL run directory. </p><p>  I am not sure if there is some setting or way to "trick" the v1.4 into applying the info to all outbound messages but you can try asking <font size="-1">Gerard Thomas (he responds rather quickly to e-mail but hasn't been overly helpful when I've asked how to use his extension in a non-standard way). You might try a DOS-type wildcard or Pegasus-aware variable / substitution. The following are from the UDG.TXT file and may only work at runtime (not when an identity is changed) but they might be of some use:</font></p><p>   Command substitution -------------------- Most of the entries in this screen which accept strings allow you to use special command substitution characters in the strings: these are like "escape sequences" which will cause PMail to perform some substitution at run-time. Command substitutions always begin with a tilde (~) character, and are always two characters long. The following command substitutions are recognised:    This sequence...   Is replaced with this value    ~c       The full path to the file containing the message    ~t       The address to which to send this message             (note: this is not necessarily the To: field)    ~s       The message's subject field    ~f       The full form of the message's "from" field    ~n       The sender's user name in its simplest form    ~b       The sender's bindery id, as a long hex integer    ~8       The first 8 chars in the sender's username    ~y       The time and date in RFC-822 format    ~d       A random integer, expressed as 4 hex digits    ~q       Y if this message is a BCC, N otherwise    ~%name%  The value of the environment variable %name%.    ~p       The user's personal name preference    ~x       The name.ext ONLY of the container file (no path)    ~a       The directory from which PMail was run (or base directory)    ~h       The current user's home mailbox location    ~w       The current user's new mail location    ~~       A single tilde character</p><p> </p>

When using a queue on a Netware server, no workstation (hostname) info is recorded. How do I go about inserting that to outbound messages?

When using a queue on a Netware server, no workstation (hostname) info is recorded. How do I go about inserting that to outbound messages?

[quote user="bryroller"]When using a queue on a Netware server, no workstation (hostname) info is recorded. How do I go about inserting that to outbound messages?
[/quote]

There is no means to do this in the system.  Pegasus Mail is talking directly to the Netware system via the w32NW4.dll when writing this file and this system does not even look at the hostname or IP address at all.  This must be caught before the message is written and that might be possible via a extension but it would be very tricky.  It would be a lot easier to simply turn off the mail queue submission and have Pegasus Mail send the mail via the built-in mailer to MercuryS.  The first header in the message should provide what you are looking for in the way of user/host identification.

The kids will find a way around that one as well though.  ;-)

 

 


 

<p>[quote user="bryroller"]When using a queue on a Netware server, no workstation (hostname) info is recorded. How do I go about inserting that to outbound messages? [/quote]</p><p>There is no means to do this in the system.  Pegasus Mail is talking directly to the Netware system via the w32NW4.dll when writing this file and this system does not even look at the hostname or IP address at all.  This must be caught before the message is written and that might be possible via a extension but it would be very tricky.  It would be a lot easier to simply turn off the mail queue submission and have Pegasus Mail send the mail via the built-in mailer to MercuryS.  The first header in the message should provide what you are looking for in the way of user/host identification. The kids will find a way around that one as well though.  ;-)</p><p> </p><p> </p><p>  </p>

I have the headers extension partially doing what I need now. Any tips on the variables that can be parsed by a forms fact file or a *.pm file?

I have the headers extension partially doing what I need now. Any tips on the variables that can be parsed by a forms fact file or a *.pm file?

I created the batch file (follows) and inserted DOS SET

EMAILADD="%Internet Email Address" in the login script. If version 1.12

of the headers extension is used, the sending hostname is pasted to all

outbound messages. I run the batch using ZENworks but could easily be

done from any login script. etc.

 

@ECHO OFF

echo [%EMAILADD%]>U:\PMAIL\headers.pm

echo header1=Received: from %COMPUTERNAME%>>U:\PMAIL\headers.pm

CLS

@EXIT

<p>I created the batch file (follows) and inserted DOS SET EMAILADD="%Internet Email Address" in the login script. If version 1.12 of the headers extension is used, the sending hostname is pasted to all outbound messages. I run the batch using ZENworks but could easily be done from any login script. etc. </p><p> </p>@ECHO OFF echo [%EMAILADD%]>U:\PMAIL\headers.pm echo header1=Received: from %COMPUTERNAME%>>U:\PMAIL\headers.pm CLS @EXIT

Hi bryroller

I'm in almost the same situation than you except that i run a 2k server, I'd like also add the username and the computername to the headers.

What kind of utility do you use to add the content of the headers.pm file to outgoing mails?

Thanks in advance 

<p>Hi bryroller</p><p>I'm in almost the same situation than you except that i run a 2k server, I'd like also add the username and the computername to the headers.</p><p>What kind of utility do you use to add the content of the headers.pm file to outgoing mails?</p><p>Thanks in advance </p>

I used an older version of the headers extension written by Gerard R Thomas (v 1.12 - found it archived on the 'net). I tried his latest release (v 1.4) listed on his website http://grt.net.tt/ but it just would not work for me. Using the batch file I created to "grab" the e-mail address variable I set + the Windows variable of %COMPUTERNAME% (I use DHCP), populating the headers.pm file is done upon every user login.



HTH,

 

Bry 

<p>I used an older version of the headers extension written by <font size="-1">Gerard R Thomas </font>(v 1.12 - found it archived on the 'net). I tried his latest release (v 1.4) listed on his website <a href="http://grt.net.tt/" title="http://grt.net.tt/" mce_href="http://grt.net.tt/">http://grt.net.tt/</a> but it just would not work for me. Using the batch file I created to "grab" the e-mail address variable <u><b><i>I set</i></b></u> + the Windows variable of %COMPUTERNAME% (I use DHCP), populating the headers.pm file is done upon every user login.</p><p> HTH,</p><p> </p><p>Bry </p>

Hi Bry
 

Thanks a lot for the tip, I could download v1.4 and it works fine!

The only problem is that the headers.pm file is not so simple than yours with v1.12 , its content is:

[<Défaut>]
number=1
header1=X-RealSender: username from computername

I had to change [Default] to [Défaut] which is the name of the default identity in the French version of Pegasus Mail.

The main problem is that a user can use a different identity (which I can't presume the name) and under this identity no special header will be added, is it the same with v1.12? or is there a solution to add an header whatever is the identity used?

Thanks again 

  

&lt;p&gt;Hi Bry &amp;nbsp;&lt;/p&gt;&lt;p&gt;Thanks a lot for the tip, I could download v1.4 and it works fine!&lt;/p&gt;&lt;p&gt;The only problem is that the headers.pm file is not so simple than yours with v1.12 , its content is: &lt;/p&gt;&lt;p&gt;[&amp;lt;D&eacute;faut&amp;gt;] number=1 header1=X-RealSender: username from computername &lt;/p&gt;&lt;p&gt;I had to change [Default] to [D&eacute;faut] which is the name of the default identity in the French version of Pegasus Mail.&lt;/p&gt;&lt;p&gt;The main problem is that a user can use a different identity (which I can&#039;t presume the name) and under this identity no special header will be added, is it the same with v1.12? or is there a solution to add an header whatever is the identity used?&lt;/p&gt;&lt;p&gt;Thanks again&amp;nbsp;&lt;/p&gt;&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;/p&gt;
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft