f



Mailer flag 'o'

Hi all,

I'm trying to get sendmail to deliver to Dovecot LDA ('deliver').

It works like this:

FEATURE(`local_procmail',`/usr/local/libexec/dovecot/deliver',
   `deliver -d $u')dnl

But I would like to use the 'w' and 'o' flags, so that deliver is invoked 
as the user who owns the mailbox, like this:

FEATURE(`local_procmail',`/usr/local/libexec/dovecot/deliver',
   `deliver',`Pfhnwo9')dnl

SPfhn9 are the default flags for local_procmail, so I have just added 'w' 
and 'o', and removed 'S'.

The Installation and Operation Guide states describes these as:

w	The user must have a valid account on this machine, i.e.,
	getpwnam must succeed. If not, the mail is bounced. See
	also the MailBoxDatabase option. This is required to get
	“.forward” capability.

o	Always run as the owner of the recipient mailbox. Normally
	sendmail runs as the sender for locally generated mail or as
	“daemon” (actually, the user specified in the u option) when
	delivering network mail. The normal behavior is required by most
	local mailers, which will not allow the envelope sender address
	to be set unless the mailer is running as daemon. This flag is
	ignored if the S flag is set.

S	Don’t reset the userid before calling the mailer. This would be
	used in a secure environment where sendmail ran as root. This
	could be used to avoid forged addresses. If the U= field is also
	specified, this flag causes the effective user id to be set to
	that user.

However, when I try to run a message with these settings, sendmail 
doesn't work.  If I run 

root@classic.viza.gotdns.com # sendmail -v -qf

Running /var/spool/mqueue/m5PGUgkI010008 (sequence 1 of 1)
<tcv@classic.viza.gotdns.com>... Connecting to local...
<tcv@classic.viza.gotdns.com>... Deferred: Connection timed out with 
classic.viza.gotdns.com

It blocked at the "Connecting to local..." for several minutes.

By replacing deliver with a tiny program that logs its uid, euid and what 
it can read, I can tell that deliver is being started properly with the 
uid and euid of the destination user (tcv above), and that read
( STDIN_FILENO, ..) returns 0.

By making the tiny program do close( STDOUT_FILENO ) before trying to 
read, sendmail does not block:

Running /var/spool/mqueue/m5PGUgkI010008 (sequence 1 of 1)
<tcv@classic.viza.gotdns.com>... Connecting to local...
<tcv@classic.viza.gotdns.com>... Deferred: Connection reset by 
classic.viza.gotdns.com

The above is instant.

So why does adding the 'o' option to a mailer make it try to read from 
the standard output of the mailer program?

I guess it is waiting for a "220 host SMTP ready" line or similar, but 
there is nothing in the documentation to say that it does that.  How do I 
get it to run as the correct user but just blindly pipe the message 
through, like FEATURE(`local_procmail') normally does?

Thanks

viza.
0
tom.viza2 (51)
6/25/2008 4:54:54 PM
comp.mail.sendmail 13508 articles. 1 followers. jfretby (35) is leader. Post Follow

10 Replies
335 Views

Similar Articles

[PageSpeed] 6

On 06/25/08 11:54, viza wrote:
Not an answer to your question, but some thoughts about it.

> FEATURE(`local_procmail',`/usr/local/libexec/dovecot/deliver',
>    `deliver',`Pfhnwo9')dnl

Rather than re-defining the binary of the `local_procmail' ""mailer, why 
not create a new ""mailer for Dovecot?  You should be able to create a 
new ""mailer by copying the cf/feature/local_procmail.m4 file to 
something like cf/feature/dovecot.m4 and editing accordingly.  You will 
get the same effect as editing the `local_procmail' ""mailer as far as 
delivery is concerned.  As an added benefit, the `local_procmail' 
""mailer will still be valid so you could chose to use it for other 
things and even better is you could submit the cf/feature/dovecot.m4 
file back to Dovecot for inclusion in to future releases for much easier 
inclusion via a simple (copy a file if it does not exist) 
"FEATURE(`Dovecot', <bla>)" line in your .mc file.

> SPfhn9 are the default flags for local_procmail, so I have just added 'w' 
> and 'o', and removed 'S'.

I don't know what the other flags indicate off the top of my head, and 
as such I'll have to look them up to better respond.

> So why does adding the 'o' option to a mailer make it try to read from 
> the standard output of the mailer program?
> 
> I guess it is waiting for a "220 host SMTP ready" line or similar, but 
> there is nothing in the documentation to say that it does that.  How do I 
> get it to run as the correct user but just blindly pipe the message 
> through, like FEATURE(`local_procmail') normally does?

Normal ""mailers (local, prog, mailman, procmail) send data to STDIN of 
the LDA and may read the exit status of the LDA.  However based on what 
you say, it sounds like your your sendmail is wanting to speak LMTP with 
the ""mailer.



Grant. . . .

0
gtaylor (1357)
6/25/2008 5:30:49 PM
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wed, 25 Jun 2008 12:30:49 -0500, Grant Taylor wrote:

> On 06/25/08 11:54, viza wrote:
> Not an answer to your question, but some thoughts about it.

>> FEATURE(`local_procmail',`/usr/local/libexec/dovecot/deliver',
>>    `deliver',`Pfhnwo9')dnl

[snip]

> Normal ""mailers (local, prog, mailman, procmail) send data to STDIN of
> the LDA and may read the exit status of the LDA.  However based on what
> you say, it sounds like your your sendmail is wanting to speak LMTP with
> the ""mailer.

I had the same problem. It seems that sendmail tries to speak LMTP if the
third argument to that FEATURE does NOT include $u. Try

FEATURE(`local_procmail',`/usr/local/libexec/dovecot/deliver',
   `deliver $u',`Pfhnwo9')dnl

but I don't know if that extra argument will mess up dovecot/deliver.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (GNU/Linux)

iD8DBQFIYo7VL6j7milTFsERAg4KAJwO0PoVDa8/0W6IxRUB8Te6H/zbcACfSOYh
BhbgoD99RZqwcgYXUKTFvMQ=
=mcLn
-----END PGP SIGNATURE-----


0
carl8110 (134)
6/25/2008 6:31:48 PM
Hi,

On Wed, 25 Jun 2008 11:31:48 -0700, Carl Byington wrote:
>> On 06/25/08 11:54, viza wrote:
 
>>> FEATURE(`local_procmail',`/usr/local/libexec/dovecot/deliver',
>>>    `deliver',`Pfhnwo9')dnl
>
> So why does adding the 'o' option to a mailer make it try to read from
> the standard output of the mailer program?
> 
> I had the same problem. It seems that sendmail tries to speak LMTP if
> the third argument to that FEATURE does NOT include $u.

Thanks Carl, that's really useful.  Has this been formally reported in a 
bugzilla or whatever else sendmail uses?

> Try
> FEATURE(`local_procmail',`/usr/local/libexec/dovecot/deliver',
>    `deliver $u',`Pfhnwo9')dnl
> 
> but I don't know if that extra argument will mess up dovecot/deliver.

Spare arguments will upset dovecot deliver.  My first thought was to just 
set the argument vector to just `$u' (after making sure that deliver 
doesn't care what argv[0] is), but that doesn't work with sendmail either.

So, here is a complete workaround using a wrapper: (source code follows)

First compile the wrapper program, defining the location of deliver and 
outputting into the same directory, in my case:

cc -DEXECUTABLE='"/usr/local/libexec/dovecot/deliver"' \
  -o /usr/local/libexec/dovecot/deliver-wrapper deliver-wrapper.c 

and change the ownership and mode of deliver-wrapper to be the same as 
deliver, in my case:

chown root:bin /usr/local/libexec/dovecot/deliver-wrapper
chmod 555 /usr/local/libexec/dovecot/deliver-wrapper

In sendmail.mc, set the executable to the location of the wrapper and the 
argument vector to include -_ $u.  Use whatever flags you need, although 
this workaround isn't necessary if you aren't trying to use the flag 
'o' (because you would be using -d $u in any other case).

FEATURE(`local_procmail',`/usr/local/libexec/dovecot/deliver-wrapper',
   `deliver -_ $u',`Pfhnwo9')dnl

That's it.  Here is the source for the wrapper program:

/* deliver-wrapper.c PUBLIC DOMAIN 2008 tom.viza@gmail.com */
/* remove -_ foo or -_foo from argument vector */

#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>

#ifndef EXECUTABLE
#error you must use -DEXECUTABLE='"/usr/bin/whatever"'
#endif

int main( int argc, char **argv ){
  char **dest= argv + 1;
  char **src= dest;

  while( *src ){
    if( '-' == src[0][0] && '_' == src[0][1] ){
      if( src[0][2] )
        ++src;

      else {
        if( src[1] )
          src+= 2;
        else 
          break;        
      }
    }
    else
      *dest++= *src++;
  }
  *dest= NULL;
  execv( EXECUTABLE, argv );  
  perror( "exec " EXECUTABLE );
  exit( EXIT_FAILURE );
}

HTH
viza
0
tom.viza2 (51)
6/25/2008 9:22:04 PM
In article <0Gy8k.63071$7m7.6202@newsfe30.ams2> viza <tom.viza@gmil.com>
writes:
>
>On Wed, 25 Jun 2008 11:31:48 -0700, Carl Byington wrote:
>> 
>> I had the same problem. It seems that sendmail tries to speak LMTP if
>> the third argument to that FEATURE does NOT include $u.
>
>Thanks Carl, that's really useful.  Has this been formally reported in a 
>bugzilla or whatever else sendmail uses?

It's working as designed - from doc/op/op.*:

           If the argument vector does not contain  $u  then
      sendmail will speak SMTP (or LMTP if the mailer flag z
      is specified) to the mailer.

It's pretty reasonable, since there must be some way for sendmail to
tell the mailer program who the recipient(s) is/are... I guess
dovecot/deliver infers that from the uid it is run as, which seems
rather "weird".

[snip wrapper that throws away $u]

Just make sure that you don't have 'm' in the mailer flags - if you do,
sendmail will expand $u to cover all of them for a message with multiple
recipients. It would seem that 'm' is incompatible with 'o', but I'm not
sure what happens if you have both.

--Per Hedeland
per@hedeland.org
0
per71 (2634)
6/25/2008 11:05:25 PM
On Wed, 25 Jun 2008 23:05:25 +0000, Per Hedeland wrote:

> In <0Gy8k.63071$7m7.6202@newsfe30.ams2> viza <tom.viza@gmil.com> writes:
>>On Wed, 25 Jun 2008 11:31:48 -0700, Carl Byington wrote:
>>> 
>>> I had the same problem. It seems that sendmail tries to speak LMTP if
>>> the third argument to that FEATURE does NOT include $u.
>>
>>Thanks Carl, that's really useful.  Has this been formally reported in a
>>bugzilla or whatever else sendmail uses?
> 
> It's working as designed - from doc/op/op.*:
> 
>            If the argument vector does not contain  $u  then
>       sendmail will speak SMTP (or LMTP if the mailer flag z is
>       specified) to the mailer.

That is hideously ambiguous!  I don't know if any policy makers read 
here, but shouldn't there be explicit flags to choose smtp, lmtp or 
piping to stdin?

> It's pretty reasonable, since there must be some way for sendmail to
> tell the mailer program who the recipient(s) is/are... I guess
> dovecot/deliver infers that from the uid it is run as, which seems
> rather "weird".

It's fairly common to discard privileges if they are not required.  Once 
the deliver process is non-privileged, there is only one mailbox it can 
possibly write to!  

Obviously this is only the case in traditional "real accounts" mode, not 
with virtual users, where you wouldn't use this feature.

> Just make sure that you don't have 'm' in the mailer flags - if you do,
> sendmail will expand $u to cover all of them for a message with multiple
> recipients. It would seem that 'm' is incompatible with 'o', but I'm not
> sure what happens if you have both.

Dovecot deliver only does one message at a time anyway.

Thanks

viza
0
tom.viza2 (51)
6/26/2008 10:01:35 AM
In article <3OJ8k.42091$Kb.16669@newsfe29.ams2> viza <tom.viza@gmil.com>
writes:
>On Wed, 25 Jun 2008 23:05:25 +0000, Per Hedeland wrote:
>> 
>> It's working as designed - from doc/op/op.*:
>> 
>>            If the argument vector does not contain  $u  then
>>       sendmail will speak SMTP (or LMTP if the mailer flag z is
>>       specified) to the mailer.
>
>That is hideously ambiguous!

Not at all - it's completely unambiguous, and succinct.	

>  I don't know if any policy makers read 
>here, but shouldn't there be explicit flags to choose smtp, lmtp or 
>piping to stdin?

The choice is not between "piping to stdin" and the others, but between
"recipients on command line" and the others - LMTP is normally on
stdin/stdout. Adding explicit flags would only bring redundancy and
additional possibilities to specify erroneous combinations
(e.g. "SMTP-flag" + $u in Argv).

>It's fairly common to discard privileges if they are not required.  Once 
>the deliver process is non-privileged, there is only one mailbox it can 
>possibly write to!  
>
>Obviously this is only the case in traditional "real accounts" mode, not 
>with virtual users, where you wouldn't use this feature.

Sendmail has no way of knowing how or where the LDA is doing delivery,
thus it's reasonable to require that the mailer definition includes a
way to pass the recipients to the mailer program, and not assume that it
will deduce this from the uid it is running as.

Actually this concept seemed so bizarre that I had to go and look up the
Dovecot docs, and as I expected, "deliver" accepts most all standard LDA
arguments - in particular (from http://wiki.dovecot.org/LDA):

  -d <username>: Destination username.

The "infer recipient from uid" mode seems to be recommended for use in
~/.forward files, where it's perfectly reasonable of course. In a
sendmail mailer definition, it isn't.

>Dovecot deliver only does one message at a time anyway.

The issue was not about multiple messages, but about one message with
multiple recipients. If you are running Dovecot "deliver" in such a way
that it can only determine recipients by checking its uid, there's
obviously no way it can deliver to multiple recipients. This wasn't the
point though - it was that sendmail must be informed about this
limitation (via the absent 'm' flag).

--Per Hedeland
per@hedeland.org
0
per71 (2634)
6/27/2008 12:02:41 PM
Hi

On Fri, 27 Jun 2008 12:02:41 +0000, Per Hedeland wrote:
> In <3OJ8k.42091$Kb.16669@newsfe29.ams2> viza <tom.viza@gmil.com> writes:
>>On Wed, 25 Jun 2008 23:05:25 +0000, Per Hedeland wrote:
>>> 
>>> It's working as designed - from doc/op/op.*:
>>>            If the argument vector does not contain  $u  then
>>>       sendmail will speak SMTP (or LMTP if the mailer flag z is
>>>       specified) to the mailer.
>>
>>That is hideously ambiguous!
> 
> Not at all - it's completely unambiguous, and succinct.

Inferring the format for messages from an almost orthogonal option is 
perhaps not ambiguous, but it does require a new administrator to look in 
places they wouldn't expect to have to for the documentation.

>> but shouldn't there be explicit flags to choose smtp, lmtp or
>>piping to stdin?
> 
> Adding explicit flags would only bring redundancy and additional
> possibilities to specify erroneous combinations (e.g.
> "SMTP-flag" + $u in Argv).

There are dozens of incompatible combinations already!  What if you 
specify 789 in flags? 

If the configuration was explicit then there would be no danger of 
getting it wrong by accident, as it seems both I and Carl Byington did.

>>It's fairly common to discard privileges if they are not required.  Once
>>the deliver process is non-privileged, there is only one mailbox it can
>>possibly write to!
>>
>>Obviously this is only the case in traditional "real accounts" mode, not
>>with virtual users, where you wouldn't use this feature.
> 
> Sendmail has no way of knowing how or where the LDA is doing delivery,
> thus it's reasonable to require that the mailer definition includes a
> way to pass the recipients to the mailer program, and not assume that it
> will deduce this from the uid it is running as.

It IS reasonable to require that the mailer definition includes a
way to pass the recipients to the mailer program.  It IS not reasonable 
to assume that it will deduce this from the uid it is running as, but 
neither is is reasonable to assume that it will use a command line 
argument to do it.  Implicit configuration is a bad idea.

> Actually this concept seemed so bizarre that I had to go and look up the
> Dovecot docs, and as I expected, "deliver" accepts most all standard LDA
> arguments - in particular (from http://wiki.dovecot.org/LDA):
> 
>   -d <username>: Destination username.

It is more complicated than that.  -d 'foo' doesn't mean "deliver to the 
mailbox 'foo'", it means "connect to the authentication agent, lookup the 
string 'foo' and determine if the process has permission to deliver to 
the mailbox that it refers to".

It is usual for normal users to not have access to the authentication 
process, so they must not use the -d option.  Of course, one could 
deliver as root with the -d option, but I'm trying to follow the 
convention of dropping privileges early.
0
tom.viza2 (51)
6/28/2008 10:38:26 AM
In article <Cwo9k.131109$Ek2.97716@newsfe17.ams2> viza
<tom.viza@gmil.com> writes:
>
>On Fri, 27 Jun 2008 12:02:41 +0000, Per Hedeland wrote:
>> In <3OJ8k.42091$Kb.16669@newsfe29.ams2> viza <tom.viza@gmil.com> writes:
>>>On Wed, 25 Jun 2008 23:05:25 +0000, Per Hedeland wrote:
>>>> 
>>>> It's working as designed - from doc/op/op.*:
>>>>            If the argument vector does not contain  $u  then
>>>>       sendmail will speak SMTP (or LMTP if the mailer flag z is
>>>>       specified) to the mailer.
>>>
>>>That is hideously ambiguous!
>> 
>> Not at all - it's completely unambiguous, and succinct.
>
>Inferring the format for messages from an almost orthogonal option is 
>perhaps not ambiguous, but it does require a new administrator to look in 
>places they wouldn't expect to have to for the documentation.
>
>[snip other arguments about the badness of the above]

I can agree that looking at current sendmail, "absence of $u" isn't the
most obvious choice of "SMTP/LMTP selector" - but to get some
understanding of why the choice was made, you need to go back to when it
happened, 25+ years ago when sendmail was first taught to speak SMTP at
all. And given that it hasn't changed since then, it's not exactly
likely to happen now, no matter how upset you get about it.

And it *is* documented - and I would certainly recommend that anyone
writing their own mailer definition *carefully* reads the *entire*
"Define Mailer" section of doc/op/op.*.

>It IS reasonable to require that the mailer definition includes a
>way to pass the recipients to the mailer program.  It IS not reasonable 
>to assume that it will deduce this from the uid it is running as, but 
>neither is is reasonable to assume that it will use a command line 
>argument to do it.  Implicit configuration is a bad idea.

It's not so much assuming as lack of support for the scheme you want -
sendmail knows of two ways to pass the recipient info to the mailer, via
commandline $u or "inline" via SMTP/LMTP - it requires that you do one
or the other. You want a third, "via process uid", and there is no
support for that - so you had to do a little tweaking to make it work.

>> Actually this concept seemed so bizarre that I had to go and look up the
>> Dovecot docs, and as I expected, "deliver" accepts most all standard LDA
>> arguments - in particular (from http://wiki.dovecot.org/LDA):
>> 
>>   -d <username>: Destination username.
>
>It is more complicated than that.  -d 'foo' doesn't mean "deliver to the 
>mailbox 'foo'", it means "connect to the authentication agent, lookup the 
>string 'foo' and determine if the process has permission to deliver to 
>the mailbox that it refers to".

Nevertheless, it seems clear from what I read of the docs that this (as
well as the use of other standard LDA flags such as -f) is how the
authors intend the program to be used as LDA.

>It is usual for normal users to not have access to the authentication 
>process, so they must not use the -d option.

But a mailer definition in sendmail is not "a normal user".

> Of course, one could 
>deliver as root with the -d option, but I'm trying to follow the 
>convention of dropping privileges early.

It's a good goal, but if you end up interfacing sendmail and a LDA such
that both are used in ways that were never intended, it may be reason to
reconsider it.

--Per Hedeland
per@hedeland.org
0
per71 (2634)
6/29/2008 9:14:07 PM
See, http://wiki.dovecot.org/LDA/Sendmail

The recommended way is to use deliver as mailer is SUID.

To trick non-SUID deliver and sendmail, this might work:

/etc/mail/smrsh/dovecot-deliver  -f $u -f $g

so you have $u on command line, but override the value with from.

Bye, ska
0
skg34 (195)
6/30/2008 10:48:02 AM
On Mon, 30 Jun 2008 03:48:02 -0700, ska wrote:

> See, http://wiki.dovecot.org/LDA/Sendmail
> 
> The recommended way is to use deliver as mailer is SUID.

No, that page (remember it's a wikiwiki so could have been written by 
anyone) recommends that when sendmail doesn't run as root.

Dovecot LDA's authors used to state that it should not be installed 
SUID.  I can't find any reference to that now, so maybe they are happy 
that that is now ok.

In any case, the whole title of this thread is "Mailer 'o'" flag, which 
means to run the LDA as the destination user.

> To trick non-SUID deliver and sendmail, this might work:
> 
> /etc/mail/smrsh/dovecot-deliver  -f $u -f $g

That's an interesting idea.  It will work too, until the dovecot 
developers update src/deliver/deliver.c to do more robust argument 
handling.  I'll include it if I get round to documenting the wrapper I 
posted elsewhere in this thread.
0
tom.viza2 (51)
6/30/2008 11:40:33 AM
Reply:

Similar Artilces:

'mail'/'sendmail' with higher priority??
Is there a way to send high priority mails to the other specific unix users, by using my unix login? I checked with the options for 'mail' and 'sendmail' and couldn't find anything relevant to it. qazmlp1209@rediffmail.com writes: > Is there a way to send high priority mails to the other specific unix > users, by using my unix login? I checked with the options for 'mail' > and 'sendmail' and couldn't find anything relevant to it. Normally, mail goes into a queue for delivery. And the queue process sends out the mail. With the right priviled...

'^=' and '~='?
Hello, What is the difference between '^=' and '~='? Thanks, Duckhye ...

'is not' or '!='
A newbie question to you; what is the difference between statements like: if x is not None: and if x != None: Without any context, which one should be preferred? IMHO, the latter is more readable. On 2014-08-18 21:35, ElChino wrote: > A newbie question to you; what is the difference between statements > like: > if x is not None: > and > if x != None: > > Without any context, which one should be preferred? > IMHO, the latter is more readable. > "x == y" tells you whether x and y refer to objects that are equal. "x is y" tells you whether x and y actually refer to the same object. In the case of singletons like None (there's only one None object), it's better to use "is". "ElChino" <elchino@cnn.cn>: > A newbie question to you; what is the difference between statements > like: > if x is not None: > and > if x != None: Do the following: take two $10 bills. Hold one bill in the left hand, hold the other bill in the right hand. Now, the bill in the left hand "is not" the bill in the right hand. However, the bill in the left hand "==" the bill in the right hand. > Without any context, which one should be preferred? > IMHO, the latter is more readable. In almost all cases, both tests would result in the same behavior. However, the "is not" test is conceptually the correct one since you want...

'''''''''''''The Running Update/Append Queries Using VBA code Ordeal''''''''''''''
Hello fellow programmers, I am trying to run an append/update query from code, a command button on a form initiates the queries. the format i am using is; _____________________________________________________ SELECT "criteria" FROM "criteria" WHERE "criteria" UPDATE/APPEND "field selections" RecordSource "qryExample" = above text strings" _______________________________________________________________________ When i am running a SELECT query in this manner it works fine with no problems, and accepts the values of specified linked form fields. This never works when doing an APPEND/UPDATE query. It can never find the values of linked form fields, Access always asks for the parameter value of the field(s) in question, or Access comes up with an error 3323 - No recordset. I am sure there are other people that have had this problem. What is the difference between Select queries and append/update queries? the append/update queries never seem to be able to find values in linked form fields. Can anyone shed any light on this or point to a knowledgebase Item, or even recommend a book focusing on this subject, I will go and buy it now. I have been for up 2 nights trying to acomplish this and now considering suicide, please help. Thanks In advance, Aaron. I know of two ways you can accomplish this. 1. You can create the SQL script for you append or update query and run the script with DoCmd.RunSQL. 2. You can create a...

'''''''''''''The Running Update/Append Queries Using VBA code Ordeal'''''''''''''' #2
Hi, Thanks for ur help there HJ. I know how to do the tasks you specified there. I would like for the update query to use field values from some of the fields on the form (frmInvoices) such as InvoiceNumber, DateFrom, DateTo. My problem is that an append/update query can't find the values in the open Form (frmInvoices) when I specify them as; [Forms]![frmInvoices]![InvoiceNumber] a select query has no problem finding the field values on a form. please help. Aaron Hi Aaron, Could you post the entire code that you are having trouble with? Now it is not possible to see what goes wrong. HJ "Aaron" <aaron@rapid-motion.co.uk> wrote in message news:260d7f40.0408120245.2f3d01f8@posting.google.com... > Hi, > > Thanks for ur help there HJ. > > I know how to do the tasks you specified there. > > I would like for the update query to use field values from some of the > fields on the form (frmInvoices) such as InvoiceNumber, DateFrom, > DateTo. My problem is that an append/update query can't find the > values in the open Form (frmInvoices) when I specify them as; > > [Forms]![frmInvoices]![InvoiceNumber] > > a select query has no problem finding the field values on a form. > > please help. > > Aaron First off, if you are not always using all the parameters specified in your form, then you have to add parameters to your query on the fly. Also, you can't just do something like qdf.SQL = "SE...

if str_mo not in ('','.') and str_da not in ('','.') and str_yy not in ('','.') Any shorter ?
Hi, there. =20 I'm just curious if it ever dawned on anybody how to abbreviate this line : if str_mo not in ('','.') and str_da not in ('','.') and str_yy not in ('','.')=20 =20 Igor Kurbeko Clinical Programmer Analyst 678 336 4328 ikurbeko@atherogenics.com =20 no brain no pain =20 how about: if not (str_mo in ('','.') or str_da in ('','.') or str_yy in ('','.')) OR if not (missing(str_mo) or missing(str_da) or missing(str_yy)) Eric On 22 Oct 03 21:13:37 GMT, ikurbeko@ATHER...

A function with 'and' , 'not' , 'null' , 'car' and 'cdr'
What's this ? (defun enigma (x) (and (not (null x)) (or (null (car x)) (enigma (cdr x))))) "I suppose I should learn Lisp, but it seems so foreign." - Paul Graham, Nov 1983 On Wed, Oct 07 2015, CAI GENGYANG wrote: > What's this ? > > > (defun enigma (x) > (and (not (null x)) > (or (null (car x)) > (enigma (cdr x))))) Bad taste? It returns T if the list X contains nil as an element. It would be clearer to write (some #'null x). Helmut CAI GENGYANG ...

error: expected '=', ',', ';', 'asm' or '__attrib
Hi I'm trying to compile an ADC Driver & come acrosss the following error. I've no experience writing drivers before, and hence have no clue how to fix it. Hope someone out there has encountered the problem & suggesst a fix for the same. The Error is I get is : qadc.c: At top level: qadc.c:97: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'qadc_read' make: *** [qadc.o] Error 1 [root@localhost qadc]# ########################################################################### ADC Driver Code ########################################################################### #define MODULE #define __KERNEL__ #include <linux/config.h> #include <linux/module.h> #include <linux/kernel.h> /* printk */ #include <linux/fs.h> / #include <linux/errno.h> /* error codes */ #include <linux/types.h> /* size_t */ #include <linux/proc_fs.h> /* proc file system */ #include <linux/fcntl.h> #include <asm/system.h> /* cli, flags */ #include <asm/uaccess.h> /* copy from/to user */ /*Registers to get qadc access*/ volatile unsigned short * qadcmcr = (unsigned short *)0x40190000; volatile unsigned short * qacr0 = (unsigned short *)0x4019000a; volatile unsigned short * qacr1 = (unsigned short *)0x4019000c; volatile unsigned short * qacr2 = (unsigned short *)0x4019000e; volatile unsigned short * qasr0 = (unsigned short *)0x40190010; volatile unsigned short * qasr1...

error: expected '=', ',', ';', 'asm' or '__attrib
Hi I'm trying to compile an ADC Driver & come acrosss the following error. I've no experience writing drivers before, and hence have no clue how to fix it. Hope someone out there has encountered the problem & suggesst a fix for the same. The Error is I get is : qadc.c: At top level: qadc.c:97: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'qadc_read' make: *** [qadc.o] Error 1 [root@localhost qadc]# ########################################################################### ADC Driver Code ##...

Difference between 'is' and '=='
Hey guys, this maybe a stupid question, but I can't seem to find the result anywhere online. When is the right time to use 'is' and when should we use '=='? Thanks alot~ mwql: >Hey guys, this maybe a stupid question, but I can't seem to find the >result anywhere online. When is the right time to use 'is' and when >should we use '=='? http://docs.python.org/ref/comparisons.html -- Ren� Pijlman mwql wrote: > Hey guys, this maybe a stupid question, but I can't seem to find the > result anywhere online. When is the right time to ...

Re: '^=' and '~='?
Duckhye, According to the doc ( http://xrl.us/befwjx ) they, and one other set of characters, and the mnemonic 'NE' all represent 'NOT EQUAL'. Art ------- On Wed, 11 Feb 2009 16:52:40 -0600, Duck-Hye Yang <dyang@CHAPINHALL.ORG> wrote: >Hello, >What is the difference between '^=' and '~='? > >Thanks, >Duckhye ...

Does '!=' equivelent to 'is not'
I'm a bit confusing about whether "is not" equivelent to "!=" if a != b: ... if a is not b: ... What's the difference between "is not" and "!=" or they are the same thing? pirata wrote: > I'm a bit confusing about whether "is not" equivelent to "!=" > > if a != b: > ... > > if a is not b: > ... > > > What's the difference between "is not" and "!=" or they are the same thing? No, they are not the same thing. == and != test to see if the *value* of two variables are the same. Like so: >>> a = 'hello world' >>> b = 'hello world' >>> a == b True a and b both have the value of 'hello world', so they are equal is and is not, however, do not test for value equivalence, they test for object identity. In other words, they test to see if the object the two variables reference are the same object in memory, like so: >>> a is b False a and b are assigned to two different objects that happen to have the same value, but nevertheless there are two separate 'hello world' objects in memory, and therefore you cannot say that a *is* b Now look at this: >>> c = d = 'hello world' >>> c == d True >>> c is d True In this case, they are again the same value, but now the is test also shows that they are the same *object* as well, because...

Override 'and' and 'or'
Is it possible to override 'and' and/or 'or'? I cannot find a special method for it... __and__ and __rand__ and __or__ and __ror__ are for binary manipulation... any proposals? Have marvelous sunday, Marco Dekker <m.aschwanden@gmail.com> wrote: > Is it possible to override 'and' and/or 'or'? I cannot find a special > method for it... __and__ and __rand__ and __or__ and __ror__ are for > binary manipulation... any proposals? If you want to customize the truth value testing you have to implement __nonzero__ " __nonzero__( self) Call...

'[OFF]' as in 'offensive'???
Hi, given that 'off-topicness' is indicated as '[OT]' and taking a look at those postings that started the threads indicated as '[OFF]' (which may both be seen as being somewhat offensive) may lead to the conclusion that '[OFF]' stands for offensiveness. I don't think that this is the intended meaning so what actually *does* '[OFF]' mean? I never came across that abbreviation before (although I have been around on the USENET for quite some time) but maybe it is worth knowing? Josef 'Jupp' Schugt NOTE: mails >100 KiB are ignored -- German edition of comp.lang.ruby FAQ - http://oss.erdfunkstelle.de/ruby/ Aurox Linux - http://qurl.net/7q | http://qurl.net/7r - Firefox Thunderbird - http://qurl.net/7s | http://qurl.net/7t - Liferea Enigmail - http://qurl.net/7u | http://qurl.net/7v - GnuPG [Josef 'Jupp' Schugt <jupp@gmx.de>, 2004-12-10 23.20 CET] > I don't think that this is the intended meaning so what actually *does* > '[OFF]' mean? Off-topic. ...

replacement for '{' and '}' ?
I am still playing around with what kind of syntax I would like to mark up my documents. Are there equivalent long substitutes for { and } when they are not used to describe arguments to functions? Something like \begin{group} and \end{group}. In other words, if I could force myself to write, say, \begin{group} \it ... \end{group} instead of {\it ... }, then I believe I could identify from the markup context what is an argument that belongs to a just invoked macro and what is text. {Of course, in this context, \textit{...} would be better.} No more ambiguity whether a in \myfunction{a} is an argument or just text. Is there a way to make latex barf when it sees an ordinary '{' in text, rather than \begin{group}, but not barf when I want it (to denote macro arguments)? Regards, /iaw On Aug 16, 6:01=A0pm, "ivo...@gmail.com" <ivo...@gmail.com> wrote: > Is there a way to make latex barf when it sees an ordinary '{' in > text, rather than \begin{group}, but not barf when I want it (to > denote macro arguments)? What do you mean exactly? I don't understand. Do you have in mind your- to-be-new-syntax or just regular latex? Cheers, Tomek ivowel@gmail.com wrote: > I am still playing around with what kind of syntax I would like to > mark up my documents. > > Are there equivalent long substitutes for { and } when they are not > used to describe arguments to functions? Something like \begin{group} > and \end{gr...

Sendmail + DBMail + ''Early Bounce''
Hi! I ran into very big problem using Sendmail+DBMail because it only allows a late bouncing of mis-addressed messages for my domains. So if my SMTP-server recieves such message with spamtrap as return address it gets blacklisted by appropriate RBL (e.g. SPAMCOP). Is it possible to modify 'check_rcpt' ruleset to check recipient's email against DBMail user database to force Sendmail to make an early bounce? As far as I know DBMail itself does not supply SMTP-server with such feature. I also could not find this problem discussion in Usenet or DBMail maillist. -- SY, TVT On 10/11/07 06:59, ttolstoy@gmail.com wrote: > I ran into very big problem using Sendmail+DBMail because it only > allows a late bouncing of mis-addressed messages for my domains. So > if my SMTP-server recieves such message with spamtrap as return > address it gets blacklisted by appropriate RBL (e.g. SPAMCOP). Dough! > Is it possible to modify 'check_rcpt' ruleset to check recipient's > email against DBMail user database to force Sendmail to make an early > bounce? I don't know if that is possible or not, but probably. I'd say that you could create a program map that could check DBMail for valid recipients somehow and integrate that test somewhere in your config, possibly in 'check_rcpt'. > As far as I know DBMail itself does not supply SMTP-server with such > feature. <sarcasm> nice </sarcasm> > I also cou...

'a'..'z'
Is it possible to achieve something like this? switch (mystring.charAt(0)) { case 'a'..'z': // do something break; } "cruster" <cruster@gmail.com> wrote in message news:1151319731.988814.326200@m73g2000cwd.googlegroups.com... > Is it possible to achieve something like this? > > switch (mystring.charAt(0)) { > case 'a'..'z': > // do something > break; > } > There are times when an if statement may be more appropriate ;) Sorry - java is not VB :) -- LTP :) cruster schreef: > Is it possible to achieve somethi...

logical to 'on' / 'off'
Hi, is there a function implemented doing this conversion? my Problem is, that I want to use the following code: set(handles.edit_curr_trq_sl,'Enable',get(hObject,'Value')) where get(hObject,'Value') gives the state of a checkbox thank you! function [str]=tf2oo(logic) switch logic case 0 str='off'; case 1 str='on'; end%switch end%function tf2oo() while i do not know a built in function, I use my own:) meisterbartsch wrote: > > > function [str]=tf2oo(logic) > switch logic > case 0 > str='off'; &g...

difference between ',' and 'a,'
Small question. In gforth is there a difference between the words ',' and 'a,'? I'm thinking not, so perhaps another question, why have both ',' and 'a,'? Thanks Should be the same, in gforth: see , : , here cell allot ! ; ok see a, : , here cell allot ! ; ok On Friday, January 9, 2015 at 5:46:04 AM UTC-8, beeflo wrote: > Small question. In gforth is there a difference between the words ',' and 'a,'? > > I'm thinking not, so perhaps another question, why have both ',' and 'a,'? > > Thanks beeflo <beeflobill@gmail.com> writes: >Small question. In gforth is there a difference between the words ',' and 'a,'? > >I'm thinking not, so perhaps another question, why have both ',' and 'a,'? In Gforth itself, there is no difference. In Gforth's cross compiler, "a," is there for addresses, and "," is there for other cells; addresses can then be relocated when loading the image. - anton -- M. Anton Ertl http://www.complang.tuwien.ac.at/anton/home.html comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html New standard: http://www.forth200x.org/forth200x.html EuroForth 2014: http://www.euroforth.org/ef14/ ...

'!' vs. '.'
Is there an advantage to using the '!' notation to represent form/ control relationships? (eg. Me!text1 vs Me.text1) I am currently using the '.' notation exclusively (for code completion in the VB Editor), but much of the high-quality code that I've seen (in Duane Hookom's Query-by-Form db, for example) uses the other. Here's one opinion for you: http://doc.advisor.com/doc/05352 robert.waters wrote: >Is there an advantage to using the '!' notation to represent form/ >control relationships? (eg. Me!text1 vs Me.text1) > >I am currently using the '.' notation exclusively (for code completion >in the VB Editor), but much of the high-quality code that I've seen >(in Duane Hookom's Query-by-Form db, for example) uses the other. -- HTH - RuralGuy (RG for short) acXP WinXP Pro Please post back to this forum so all may benefit. Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/databases-ms-access/200704/1 Here's my $0.02 worth on this. I tend to copy the notation style and naming conventions that I see being used in the Help files. That would be Me![text1] for a control on a form. I am of the belief that this notation explicitly refers to a control itself rather than a field in the form's recordset. Here's an example: I have a parts inventory app that uses a "Line" code, which is usually a 3-character abbreviation for a brand name, and is the na...

We Are Selling The Nextel I930 For Just $130usd'''''''''''
Dear Customer We have all brands of Mobile Phones,Ipods,Sidekicks,Nextel phone,Laptops for sell at cheap an affordable prices, they ranges from Nokia/Samsung/LG/Son Ericsson/Motorola/Alcatel/panasonic With Bluetooth, al Brands and Models of Nextel Phones, we want you to get bac to us with your quote so that we can begin a good busines relationship. Note they are all Brand New T2 Euro specs unlocked, no operator logo, come in thei original sealed box, With 1 year international warrant from the manufacturer, English & Spanish manual, Finlan made We want to assure you that you will never regret buyin from us because the delivery will be to your doorstep vi FedEx Courier service.And the Tracking number shall be sen to you upon acknowledgement of your payment Kindly acknowledge the reciept of our mail and get back t us at mobiledealer_ltd@yahoo.co -- lolasam whats your url? lolasam wrote: > Dear Customers > > We have all brands of Mobile Phones,Ipods,Sidekicks,Nextels > phone,Laptops for sell at cheap and > affordable prices, they ranges from Nokia/Samsung/LG/Sony > Ericsson/Motorola/Alcatel/panasonic With Bluetooth, all > Brands and Models of Nextel Phones, we want you to get back > to us with your quote so that we can begin a good business > relationship. Note they are all Brand New T2 Euro specs, > unlocked, no operator logo, come in their > original sealed box, With 1 year international warranty > from the manufacturer, English &a...

Re: if str_mo not in ('','.') and str_da not in ('','.') and str_yy not in ('','.') Any shorter ? #2
Igor, There are many ways to make it more concise, however the parsimony is likely to be achieved at the expense of clarity. For instance, the expressions length ( input (mm||dd||yy, $10.) ) > 2 length ( compress(mm||dd||yy, ' .') ) > 2 and like might be somewhat shorter than the original, but they will execute slower, and their intent is far less eminent. Since it appears that you are trying to validate the components of a date, maybe it is not a worthless idea to try the date informat conforming to the mask you are testing. Say if all the pieces are 2-digit, the expression input (mm||dd||yy, ?? mmddyy6.) will return a missing value for the case you are testing and also if any irregularities in the input value that prevent it from being interpreted as a valid date should be found. And if you want a note in the log to alert you about it, leave one of the question marks off. Kind regards, ================= Paul M. Dorfman Jacksonville, FL ================= >From: Igor Kurbeko <ikurbeko@ATHEROGENICS.COM> >Reply-To: Igor Kurbeko <ikurbeko@ATHEROGENICS.COM> >To: SAS-L@LISTSERV.UGA.EDU >Subject: if str_mo not in ('','.') and str_da not in ('','.') and str_yy > not in ('','.') Any shorter ? >Date: Wed, 22 Oct 2003 17:13:37 -0400 > >Hi, there. > > > >I'm just curious if it ever dawned on anybody how to abbreviate this >line : > >if ...

Is there a 'break' or 'continue' in 'Do Unitl'... 'Loop'?
If some condition is met, I would like to move to the next record. I tried 'Exit Do', which exits, this is not what i want; i tried 'break' or 'continue loop', none of them works. so, now i used a label with GoTo clause. I am just wondering what is the correct syntax? Thanks, ming swingingming wrote: > If some condition is met, I would like to move to the next record. I > tried 'Exit Do', which exits, this is not what i want; i tried 'break' > or 'continue loop', none of them works. so, now i used a label with > GoTo clause. > I am just wondering what is the correct syntax? > Thanks, ming > The exit do is the correct syntax. Or you can have the same or a different condition itself in the do while statement. For example, the following is building a string, strRoute (for a list of hexes along a straight line in a hexagonal overlay of a map): Do While intCount <= Abs(dy) lngY = lngY + Sgn(dy) lngx = lngx + Sgn(dy) strRoute = strRoute & "," & lngY & "-" & lngx & "," & lngY & "-" & lngx - Sgn(dy) intCount = intCount + 1 If intCount > Abs(dy) Then Exit Do lngY = lngY + Sgn(dy) strRoute = strRoute & "," & lngY & "-" & lngx intCount = intCount + 1 Loop The exit do ...

Like '' & '' & ''
Having this description column in a table "Cookies, peanut butter sandwich, regular" When using this WHERE clause: WHERE (((Food_Data.Description) Like "*Butter*" & "*Peanut*")); I dont get any results, however when using it this way round WHERE (((Food_Data.Description) Like "*Peanut*" & "*Butter*")); I get the row as expected. I assume that the query looks for them in order. Is there a way i can get around this and make the query search for both keywords no matter which order i ype them in. Thanks Dave [posted and mailed] SkunkDave (dave_casserly@totalise.co.uk) writes: > Having this description column in a table > > "Cookies, peanut butter sandwich, regular" > > > When using this WHERE clause: > > WHERE (((Food_Data.Description) Like "*Butter*" & "*Peanut*")); > > I dont get any results, however when using it this way round > > WHERE (((Food_Data.Description) Like "*Peanut*" & "*Butter*")); > > I get the row as expected. > > I assume that the query looks for them in order. The query looks for a string that matches the pattern "*Peanut**Butter*", so obviously it's not going to match "Butter Peanut". As suggested by Harald Albrech this works: WHERE (Food_Data.Description Like "*Butter*" or Food_Data..Description Like "*Peanut...

Web resources about - Mailer flag 'o' - comp.mail.sendmail

Resources last updated: 3/25/2016 4:31:47 AM